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

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

Issue 11416324: Revert changes to have ExtensionService notify ThemeService directly (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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/gtk/gtk_theme_service.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/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 900f2041234c29b26c80a6d0c1d205e34efdbd5f..6dc9012a40587f9c2625e29f328f9eda136ad4b9 100644
--- a/chrome/browser/ui/gtk/gtk_theme_service.cc
+++ b/chrome/browser/ui/gtk/gtk_theme_service.cc
@@ -294,6 +294,7 @@ void GtkThemeService::Init(Profile* profile) {
registrar_.Add(prefs::kUsesSystemTheme,
base::Bind(&GtkThemeService::OnUsesSystemThemeChanged,
base::Unretained(this)));
+ use_gtk_ = profile->GetPrefs()->GetBoolean(prefs::kUsesSystemTheme);
ThemeService::Init(profile);
}
@@ -335,7 +336,7 @@ bool GtkThemeService::HasCustomImage(int id) const {
return ThemeService::HasCustomImage(id);
}
-void GtkThemeService::InitThemesFor(content::NotificationObserver* observer) {
+void GtkThemeService::InitThemesFor(NotificationObserver* observer) {
observer->Observe(chrome::NOTIFICATION_BROWSER_THEME_CHANGED,
content::Source<ThemeService>(this),
content::NotificationService::NoDetails());
@@ -619,14 +620,6 @@ void GtkThemeService::ClearAllThemeData() {
}
void GtkThemeService::LoadThemePrefs() {
- if (ThemeService::UsingDefaultTheme()) {
- use_gtk_ = profile()->GetPrefs()->GetBoolean(prefs::kUsesSystemTheme);
- } else {
- // Do this here since ThemeServiceFactory::SetThemeForProfile()
- // doesn't know to set kUsesSystemTheme to false.
- profile()->GetPrefs()->SetBoolean(prefs::kUsesSystemTheme, false);
- use_gtk_ = false;
- }
if (use_gtk_) {
LoadGtkValues();
} else {
« no previous file with comments | « chrome/browser/ui/gtk/gtk_theme_service.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698