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

Unified Diff: chrome/browser/ui/views/location_bar/location_bar_view.cc

Issue 11421029: Remove PrefObserver usages, batch 13. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix - rebase Created 8 years, 1 month 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/views/location_bar/location_bar_view.cc
diff --git a/chrome/browser/ui/views/location_bar/location_bar_view.cc b/chrome/browser/ui/views/location_bar/location_bar_view.cc
index 4e150ccde6c56f428064defc9bb6907e458c7335..3a3c56242912321467630f46248f638eaa92c0f5 100644
--- a/chrome/browser/ui/views/location_bar/location_bar_view.cc
+++ b/chrome/browser/ui/views/location_bar/location_bar_view.cc
@@ -202,8 +202,12 @@ LocationBarView::LocationBarView(Browser* browser,
true));
}
- edit_bookmarks_enabled_.Init(prefs::kEditBookmarksEnabled,
- profile_->GetPrefs(), this);
+ edit_bookmarks_enabled_.Init(
+ prefs::kEditBookmarksEnabled,
+ profile_->GetPrefs(),
+ base::Bind(&LocationBarView::Update,
+ base::Unretained(this),
+ static_cast<content::WebContents*>(NULL)));
}
LocationBarView::~LocationBarView() {
@@ -1511,12 +1515,6 @@ void LocationBarView::Observe(int type,
}
}
-void LocationBarView::OnPreferenceChanged(PrefServiceBase* service,
- const std::string& pref_name) {
- if (pref_name == prefs::kEditBookmarksEnabled)
- Update(NULL);
-}
-
int LocationBarView::GetInternalHeight(bool use_preferred_size) {
int total_height =
use_preferred_size ? GetPreferredSize().height() : height();
« no previous file with comments | « chrome/browser/ui/views/location_bar/location_bar_view.h ('k') | chrome/browser/ui/webui/options/content_settings_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698