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

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

Issue 11421191: Notify the ThemeService on extension install and not extension load (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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/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 5c0f73c052b0fdfe4b8d0f46ecc984db47f4f7b7..900f2041234c29b26c80a6d0c1d205e34efdbd5f 100644
--- a/chrome/browser/ui/gtk/gtk_theme_service.cc
+++ b/chrome/browser/ui/gtk/gtk_theme_service.cc
@@ -294,7 +294,6 @@ 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);
}
@@ -620,6 +619,14 @@ 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 {

Powered by Google App Engine
This is Rietveld 408576698