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

Unified Diff: chrome/browser/ui/gtk/location_bar_view_gtk.cc

Issue 11345008: Remove content::NotificationObserver dependency from most Prefs code. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge LKGR. Created 8 years, 2 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/gtk/location_bar_view_gtk.cc
diff --git a/chrome/browser/ui/gtk/location_bar_view_gtk.cc b/chrome/browser/ui/gtk/location_bar_view_gtk.cc
index a90d22f35dd4ffad55c8603be244a01f4b5ce019..083b28d1ad026efdf93b95a9478cb109ff037cd5 100644
--- a/chrome/browser/ui/gtk/location_bar_view_gtk.cc
+++ b/chrome/browser/ui/gtk/location_bar_view_gtk.cc
@@ -1103,17 +1103,6 @@ void LocationBarViewGtk::Observe(int type,
break;
}
- case chrome::NOTIFICATION_PREF_CHANGED: {
- std::string* pref_name_in = content::Details<std::string>(details).ptr();
- DCHECK(pref_name_in);
-
- if (*pref_name_in == prefs::kEditBookmarksEnabled)
- UpdateStarIcon();
- else
- NOTREACHED();
- break;
- }
-
case chrome::NOTIFICATION_BROWSER_THEME_CHANGED: {
if (theme_service_->UsingNativeTheme()) {
gtk_widget_modify_bg(tab_to_search_box_, GTK_STATE_NORMAL, NULL);
@@ -1176,6 +1165,14 @@ void LocationBarViewGtk::Observe(int type,
}
}
+void LocationBarViewGtk::OnPreferenceChanged(PrefServiceBase* service,
+ const std::string& pref_name) {
+ if (pref_name == prefs::kEditBookmarksEnabled)
+ UpdateStarIcon();
+ else
+ NOTREACHED();
+}
+
gboolean LocationBarViewGtk::HandleExpose(GtkWidget* widget,
GdkEventExpose* event) {
// If we're not using GTK theming, draw our own border over the edge pixels

Powered by Google App Engine
This is Rietveld 408576698