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

Unified Diff: chrome/browser/ui/bookmarks/bookmark_utils.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_utils.cc
diff --git a/chrome/browser/ui/bookmarks/bookmark_utils.cc b/chrome/browser/ui/bookmarks/bookmark_utils.cc
index d09165c26a27ac07f644b404fefec0cbd008d64e..4d104be6f3535d419e93099c4cc1ac2034c861cf 100644
--- a/chrome/browser/ui/bookmarks/bookmark_utils.cc
+++ b/chrome/browser/ui/bookmarks/bookmark_utils.cc
@@ -18,6 +18,7 @@
#include "chrome/browser/ui/simple_message_box.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/web_contents.h"
#include "grit/chromium_strings.h"
#include "grit/generated_resources.h"
@@ -240,7 +241,7 @@ void GetURLAndTitleToBookmark(content::WebContents* web_contents,
}
void ToggleBookmarkBarWhenVisible(content::BrowserContext* browser_context) {
- PrefService* prefs = PrefServiceFromBrowserContext(browser_context);
+ PrefService* prefs = components::UserPrefs::Get(browser_context);
const bool always_show = !prefs->GetBoolean(prefs::kShowBookmarkBar);
// The user changed when the bookmark bar is shown, update the preferences.

Powered by Google App Engine
This is Rietveld 408576698