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

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 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/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..07da50ccc311a15661f480da1fa74d8a13213f08 100644
--- a/chrome/browser/ui/gtk/gtk_theme_service.cc
+++ b/chrome/browser/ui/gtk/gtk_theme_service.cc
@@ -367,16 +367,14 @@ 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);
}
+
+ // ThemeService does not observe prefs changes, so no need to
+ // forward to the base class.
Mattias Nissler (ping if slow) 2012/10/31 13:29:36 This comment does make sense for people who are aw
Jói 2012/10/31 14:56:26 Done.
}
GtkWidget* GtkThemeService::BuildChromeButton() {

Powered by Google App Engine
This is Rietveld 408576698