 import Foundation
 
 import UIKit
+
+public struct BookmarkRoots {
+    // These are stolen from Fennec's BrowserContract.
+    static let MOBILE_FOLDER_GUID = "mobile"
+    static let PLACES_FOLDER_GUID = "places"
+    static let MENU_FOLDER_GUID = "menu"
+    static let TAGS_FOLDER_GUID = "tags"
+    static let TOOLBAR_FOLDER_GUID = "toolbar"
+    static let UNFILED_FOLDER_GUID = "unfiled"
+    static let FAKE_DESKTOP_FOLDER_GUID = "desktop"
+    static let PINNED_FOLDER_GUID = "pinned"
+}
 
 /**
  * The immutable base interface for bookmarks and folders.

     * This class could return the full data immediately. We don't, because real DB-backed code won't.
     */
    var nullModel: BookmarksModel {
        let f = MemoryBookmarkFolder(id: "root", name: "Root", children: [])
        return BookmarksModel(modelFactory: self, root: f)
    }


    func modelForFolder(guid: String, success: (BookmarksModel) -> (), failure: (Any) -> ()) {
        var m: BookmarkFolder
        switch (guid) {
        case BookmarkRoots.MOBILE_FOLDER_GUID:
            // Transparently merges in any queued items.
            m = self.mobile.append(self.sink.queue)
            break;
        case BookmarkRoots.PLACES_FOLDER_GUID:
            m = self.root
            break;
        case BookmarkRoots.UNFILED_FOLDER_GUID:
            m = self.unsorted
            break;
        default:
