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

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: Back to the future - reverting to my original approach 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 | « no previous file | chrome/browser/themes/theme_service_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/extension_service.cc
diff --git a/chrome/browser/extensions/extension_service.cc b/chrome/browser/extensions/extension_service.cc
index 779456147d73a23a45189e6b4b28fe095f16f287..ebafe1b14db5f53baf21a5b1fbd8995951dc7166 100644
--- a/chrome/browser/extensions/extension_service.cc
+++ b/chrome/browser/extensions/extension_service.cc
@@ -1162,6 +1162,16 @@ void ExtensionService::NotifyExtensionUnloaded(
content::Source<Profile>(profile_),
content::Details<UnloadedExtensionInfo>(&details));
+#if defined(ENABLE_THEMES)
+ // If the current theme is being unloaded, tell ThemeService to revert back
+ // to the default theme.
+ if (reason != extension_misc::UNLOAD_REASON_UPDATE && extension->is_theme()) {
+ ThemeService* theme_service = ThemeServiceFactory::GetForProfile(profile_);
+ 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') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698