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

Unified Diff: chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.mm

Issue 11280115: Remove PrefObserver usages, batch 12. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix removal of PrefServiceObserver usage. Created 8 years 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
« no previous file with comments | « chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.mm
diff --git a/chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.mm b/chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.mm
index e972af9283789c844642d03b0f86bc078634b4b4..d652f6c0489d53e2555c0f991f93bfa2fac04949 100644
--- a/chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.mm
+++ b/chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.mm
@@ -139,8 +139,11 @@ LocationBarViewMac::LocationBarViewMac(
chrome::NOTIFICATION_EXTENSION_LOCATION_BAR_UPDATED,
content::Source<Profile>(browser_->profile()));
- edit_bookmarks_enabled_.Init(prefs::kEditBookmarksEnabled,
- profile_->GetPrefs(), this);
+ edit_bookmarks_enabled_.Init(
+ prefs::kEditBookmarksEnabled,
+ profile_->GetPrefs(),
+ base::Bind(&LocationBarViewMac::OnEditBookmarksEnabledChanged,
+ base::Unretained(this)));
}
LocationBarViewMac::~LocationBarViewMac() {
@@ -597,8 +600,7 @@ void LocationBarViewMac::Observe(int type,
}
}
-void LocationBarViewMac::OnPreferenceChanged(PrefServiceBase* service,
- const std::string& pref_name) {
+void LocationBarViewMac::OnEditBookmarksEnabledChanged() {
UpdateStarDecorationVisibility();
OnChanged();
}
« no previous file with comments | « chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698