Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(525)

Unified Diff: chrome/browser/android/tab_android.cc

Issue 1203713002: Limit access to ChromeBookmarkClient to bookmarks code (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@cleanup_bookmark_client
Patch Set: Rebase Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/android/tab_android.cc
diff --git a/chrome/browser/android/tab_android.cc b/chrome/browser/android/tab_android.cc
index e696c83ce02fb1e7785ecbb3592d893f5dc8a1ae..3adae7c41e09e0bef48a792fe0ce648f1fe27dd0 100644
--- a/chrome/browser/android/tab_android.cc
+++ b/chrome/browser/android/tab_android.cc
@@ -14,8 +14,6 @@
#include "chrome/browser/android/compositor/tab_content_manager.h"
#include "chrome/browser/android/metrics/uma_utils.h"
#include "chrome/browser/bookmarks/bookmark_model_factory.h"
-#include "chrome/browser/bookmarks/chrome_bookmark_client.h"
-#include "chrome/browser/bookmarks/chrome_bookmark_client_factory.h"
#include "chrome/browser/browser_about_handler.h"
#include "chrome/browser/chrome_notification_types.h"
#include "chrome/browser/content_settings/tab_specific_content_settings.h"
@@ -770,8 +768,6 @@ jlong TabAndroid::GetBookmarkId(JNIEnv* env,
// Get all the nodes for |url| and sort them by date added.
std::vector<const bookmarks::BookmarkNode*> nodes;
- ChromeBookmarkClient* client =
- ChromeBookmarkClientFactory::GetForProfile(profile);
bookmarks::BookmarkModel* model =
BookmarkModelFactory::GetForProfile(profile);
model->GetNodesByURL(url, &nodes);
@@ -779,7 +775,7 @@ jlong TabAndroid::GetBookmarkId(JNIEnv* env,
// Return the first node matching the search criteria.
for (size_t i = 0; i < nodes.size(); ++i) {
- if (only_editable && !client->CanBeEditedByUser(nodes[i]))
+ if (only_editable && !model->CanBeEditedByUser(nodes[i]))
continue;
return nodes[i]->id();
}

Powered by Google App Engine
This is Rietveld 408576698