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

Unified Diff: chrome/browser/extensions/extension_service.cc

Issue 11434002: Change ThemeService to handle uninstalled themes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: No longer reset themes when a theme is updated. 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/extensions/extension_service.cc
diff --git a/chrome/browser/extensions/extension_service.cc b/chrome/browser/extensions/extension_service.cc
index fac49f28d5d64d1bae52185f2c766a52f764ca9a..23908888e1244c7b75983e66f912e96f3b7643ae 100644
--- a/chrome/browser/extensions/extension_service.cc
+++ b/chrome/browser/extensions/extension_service.cc
@@ -1168,6 +1168,16 @@ void ExtensionService::NotifyExtensionUnloaded(
content::Source<Profile>(profile_),
content::Details<UnloadedExtensionInfo>(&details));
+#if defined(ENABLE_THEMES)
+ // Let the ThemeService know that the theme has been unloaded.
+ if (reason != extension_misc::UNLOAD_REASON_UPDATE &&
+ extension->is_theme()) {
+ ThemeService* theme_service = ThemeServiceFactory::GetForProfile(profile_);
akalin 2012/11/29 20:40:12 can you use ThemeService::GetThemeIDForProfile()?
Andrew T Wilson (Slow) 2012/11/30 12:44:55 Done. If you are concerned about startup regressio
+ if (extension->id() == theme_service->GetThemeID())
+ theme_service->UseDefaultTheme();
+ }
+#endif
+
for (content::RenderProcessHost::iterator i(
content::RenderProcessHost::AllHostsIterator());
!i.IsAtEnd(); i.Advance()) {
« no previous file with comments | « no previous file | chrome/browser/themes/theme_service_unittest.cc » ('j') | chrome/browser/themes/theme_service_unittest.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698