[][src]Function places::import::ios_bookmarks::import_ios_bookmarks

pub fn import_ios_bookmarks(
    places_api: &PlacesApi,
    path: impl AsRef<Path>
) -> Result<()>

This import is used for iOS sync users migrating from browser.db-based bookmark storage to the new rust-places store.

It is only used for users who are not connected to sync, as syncing bookmarks will go through a more reliable, robust, and well-tested path, and will migrate things that are unavailable on iOS due to the unfortunate history of iOS bookmark sync (accurate last modified times, for example).

As a result, the goals of this import are as follows:

  1. Any locally created items must be persisted.

  2. Any items from remote machines that are visible to the user must be persisted. (Note: before writing this, most of us believed that iOS wiped its view of remote bookmarks on sync sign-out. Apparently it does not, and its unclear if it ever did).

Additionally, it's worth noting that we assume that the iOS tree is relatively well-formed. We do leverage dogear for the merge, to avoid anything absurd, but for the most part the validation is fairly loose. If we see anything we don't like (URL we don't allow, for example), we skip it.

Unsupported features

As such, the following things are explicitly not imported:

Some of this (queries, really) is a little unfortunate, since it's theoretically possible for someone to care, but this should only happen for users:

For these users, upon signing into sync once again, they will lose the data in question.

Basic process