Skip to content
This repository has been archived by the owner on Aug 4, 2022. It is now read-only.

Commit

Permalink
Bug 1481445 - Remove nsINavBookmarksService::mobileFolder and PlacesU…
Browse files Browse the repository at this point in the history
…tils.mobileFolderId. r=lina

Depends on D2851

Differential Revision: https://phabricator.services.mozilla.com/D2852
  • Loading branch information
Standard8 committed Aug 7, 2018
1 parent 75fe187 commit cadfe86
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 28 deletions.
5 changes: 0 additions & 5 deletions toolkit/components/places/PlacesUtils.jsm
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*
Expand Down
5 changes: 0 additions & 5 deletions toolkit/components/places/nsINavBookmarksService.idl
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
10 changes: 0 additions & 10 deletions toolkit/components/places/nsNavBookmarks.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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",
}];
Expand All @@ -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);
}

Expand Down

0 comments on commit cadfe86

Please sign in to comment.