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

Unified Diff: chrome/browser/ui/bookmarks/bookmark_context_menu_controller.cc

Issue 12340111: Introduce //components/user_prefs, use to eliminate c/b/prefs dependency in Autofill. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Pure merge of LKGR Created 7 years, 10 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/ui/bookmarks/bookmark_context_menu_controller.cc
diff --git a/chrome/browser/ui/bookmarks/bookmark_context_menu_controller.cc b/chrome/browser/ui/bookmarks/bookmark_context_menu_controller.cc
index 47684b34130d516fe7af23f541a6dc6065528b13..5483e2fb6bc78bc95d67bf91a9a49b2df53e1bd3 100644
--- a/chrome/browser/ui/bookmarks/bookmark_context_menu_controller.cc
+++ b/chrome/browser/ui/bookmarks/bookmark_context_menu_controller.cc
@@ -18,6 +18,7 @@
#include "chrome/browser/ui/chrome_pages.h"
#include "chrome/browser/ui/tabs/tab_strip_model.h"
#include "chrome/common/pref_names.h"
+#include "components/user_prefs/user_prefs.h"
#include "content/public/browser/page_navigator.h"
#include "content/public/browser/user_metrics.h"
#include "grit/generated_resources.h"
@@ -248,12 +249,12 @@ void BookmarkContextMenuController::ExecuteCommand(int id) {
bool BookmarkContextMenuController::IsCommandIdChecked(int command_id) const {
DCHECK(command_id == IDC_BOOKMARK_BAR_ALWAYS_SHOW);
- PrefService* prefs = PrefServiceFromBrowserContext(profile_);
+ PrefService* prefs = components::UserPrefs::Get(profile_);
return prefs->GetBoolean(prefs::kShowBookmarkBar);
}
bool BookmarkContextMenuController::IsCommandIdEnabled(int command_id) const {
- PrefService* prefs = PrefServiceFromBrowserContext(profile_);
+ PrefService* prefs = components::UserPrefs::Get(profile_);
bool is_root_node = selection_.size() == 1 &&
selection_[0]->parent() == model_->root_node();

Powered by Google App Engine
This is Rietveld 408576698