Bug 1481445 - Remove nsINavBookmarksService::mobileFolder and PlacesUtils.mobileFolderId. r=lina

Depends on D2851

Differential Revision: https://phabricator.services.mozilla.com/D2852

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Mark Banner 2018-08-07 18:09:01 +00:00
parent 8c39205461
commit 8ca5017f6f
4 changed files with 8 additions and 28 deletions

View File

@ -1283,11 +1283,6 @@ var PlacesUtils = {
return this.unfiledBookmarksFolderId = this.bookmarks.unfiledBookmarksFolder;
},
get mobileFolderId() {
delete this.mobileFolderId;
return this.mobileFolderId = this.bookmarks.mobileFolder;
},
/**
* Checks if item is a root.
*

View File

@ -296,11 +296,6 @@ interface nsINavBookmarksService : nsISupports
*/
readonly attribute long long toolbarFolder;
/**
* The item ID of the mobile bookmarks folder.
*/
readonly attribute long long mobileFolder;
/**
* The total number of Sync changes (inserts, updates, deletes, merges, and
* uploads) recorded since Places startup for all bookmarks.

View File

@ -350,16 +350,6 @@ nsNavBookmarks::GetUnfiledBookmarksFolder(int64_t* aRoot)
}
NS_IMETHODIMP
nsNavBookmarks::GetMobileFolder(int64_t* aRoot)
{
int64_t id = mDB->GetMobileFolderId();
NS_ENSURE_TRUE(id > 0, NS_ERROR_UNEXPECTED);
*aRoot = id;
return NS_OK;
}
NS_IMETHODIMP
nsNavBookmarks::GetTotalSyncChanges(int64_t* aTotalSyncChanges)
{

View File

@ -1244,32 +1244,32 @@ tests.push({
let bookmarks = [{
placeId: this._placeA,
parentId: PlacesUtils.unfiledBookmarksFolderId,
parentGuid: PlacesUtils.bookmarks.unfiledGuid,
title: "A",
guid: "bookmarkAAAA",
}, {
placeId: placeB,
parentId: PlacesUtils.mobileFolderId,
parentGuid: PlacesUtils.bookmarks.mobileGuid,
title: "B",
guid: "bookmarkBBBB",
}, {
placeId: placeC,
parentId: PlacesUtils.bookmarksMenuFolderId,
parentGuid: PlacesUtils.bookmarks.menuGuid,
title: "C1",
guid: "bookmarkCCC1",
}, {
placeId: placeC,
parentId: PlacesUtils.toolbarFolderId,
parentGuid: PlacesUtils.bookmarks.toolbarGuid,
title: "C2",
guid: "bookmarkCCC2",
}, {
placeId: this._placeD,
parentId: PlacesUtils.toolbarFolderId,
parentGuid: PlacesUtils.bookmarks.toolbarGuid,
title: "D",
guid: "bookmarkDDDD",
}, {
placeId: this._placeE,
parentId: PlacesUtils.unfiledBookmarksFolderId,
parentGuid: PlacesUtils.bookmarks.unfiledGuid,
title: "E",
guid: "bookmarkEEEE",
}];
@ -1282,9 +1282,9 @@ tests.push({
keyword: "bye",
}];
for (let { placeId, parentId, title, guid } of bookmarks) {
for (let { placeId, parentGuid, title, guid } of bookmarks) {
let itemId = addBookmark(placeId, PlacesUtils.bookmarks.TYPE_BOOKMARK,
parentId, null, null, title, guid);
await PlacesUtils.promiseItemId(parentGuid), null, null, title, guid);
this._bookmarkIds.push(itemId);
}