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

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

Issue 11345008: Remove content::NotificationObserver dependency from most Prefs code. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge to head for commit 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
« no previous file with comments | « chrome/browser/ui/gtk/gtk_theme_service.h ('k') | chrome/browser/ui/gtk/location_bar_view_gtk.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/gtk/gtk_theme_service.cc
diff --git a/chrome/browser/ui/gtk/gtk_theme_service.cc b/chrome/browser/ui/gtk/gtk_theme_service.cc
index 814c53584a7dc8bc1f2bd378f635513ccb15e228..cfb3368ebc44c13440cd637b1ffe44a1cf6f4622 100644
--- a/chrome/browser/ui/gtk/gtk_theme_service.cc
+++ b/chrome/browser/ui/gtk/gtk_theme_service.cc
@@ -367,15 +367,10 @@ bool GtkThemeService::UsingNativeTheme() const {
return use_gtk_;
}
-void GtkThemeService::Observe(int type,
- const content::NotificationSource& source,
- const content::NotificationDetails& details) {
- if ((type == chrome::NOTIFICATION_PREF_CHANGED) &&
- (*content::Details<std::string>(details).ptr() ==
- prefs::kUsesSystemTheme)) {
+void GtkThemeService::OnPreferenceChanged(PrefServiceBase* service,
+ const std::string& pref_name) {
+ if (pref_name == prefs::kUsesSystemTheme) {
use_gtk_ = profile()->GetPrefs()->GetBoolean(prefs::kUsesSystemTheme);
- } else {
- ThemeService::Observe(type, source, details);
}
}
« no previous file with comments | « chrome/browser/ui/gtk/gtk_theme_service.h ('k') | chrome/browser/ui/gtk/location_bar_view_gtk.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698