canmove, Confirmed users
725
edits
No edit summary |
No edit summary |
||
Line 20: | Line 20: | ||
Description of Sync's bookmark record (includes folders, separators, livemarks, etc.): https://wiki.mozilla.org/Labs/Weave/Developer/BrowserObjects#bookmark | Description of Sync's bookmark record (includes folders, separators, livemarks, etc.): https://wiki.mozilla.org/Labs/Weave/Developer/BrowserObjects#bookmark | ||
==Read== | ==Read== | ||
Line 56: | Line 44: | ||
To update already existing items, we call setItemTitle(), changeBookmarkURI(), setKeywordForBookmark() and update various annations. Perhaps there could be an updateBookmarkAsync() akin to insertBookmarkAsync() to save us these various separate method calls? | To update already existing items, we call setItemTitle(), changeBookmarkURI(), setKeywordForBookmark() and update various annations. Perhaps there could be an updateBookmarkAsync() akin to insertBookmarkAsync() to save us these various separate method calls? | ||
==Detailed Proposal== | |||
Introduce | |||
* getBookmarkInfoAsync() | |||
* insertBookmarkAsync() | |||
* updateBookmarkAsync() | |||
that return/take in as much information as we keep about bookmarks. | |||
TODO flesh these out | |||
Line 64: | Line 64: | ||
Same as with bookmarks, really, but much less complicated. | Same as with bookmarks, really, but much less complicated. | ||
Description of Sync's history records: https://wiki.mozilla.org/Labs/Weave/Developer/BrowserObjects#history | |||
==Read== | ==Read== | ||
Line 77: | Line 73: | ||
Right now call nsINavHistoryService::addVisit() for each visit in a history record that doesn't exist locally yet and then nsINavHistoryService::setPageTitle() to set the page title. As discussed in https://bugzilla.mozilla.org/show_bug.cgi?id=606966#c14, an API that would allow us to pass in the page title and a list of visits would be great. It would asynchronously set the page title and add all the visits (unless they exist already) | Right now call nsINavHistoryService::addVisit() for each visit in a history record that doesn't exist locally yet and then nsINavHistoryService::setPageTitle() to set the page title. As discussed in https://bugzilla.mozilla.org/show_bug.cgi?id=606966#c14, an API that would allow us to pass in the page title and a list of visits would be great. It would asynchronously set the page title and add all the visits (unless they exist already) | ||
==Detailed Proposal== | |||
Introduce | |||
* addVisitsAsync(uri, title, [array of visits], callback) | |||
TODO flesh out |