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

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

Issue 11411330: Have ExtensionService notify ThemeService directly for themes (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase on head 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.h » ('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 a10372ecd07d6a56aa87682c196f724c959538f8..779456147d73a23a45189e6b4b28fe095f16f287 100644
--- a/chrome/browser/extensions/extension_service.cc
+++ b/chrome/browser/extensions/extension_service.cc
@@ -2107,6 +2107,15 @@ void ExtensionService::AddExtension(const Extension* extension) {
SyncExtensionChangeIfNeeded(*extension);
NotifyExtensionLoaded(extension);
DoPostLoadTasks(extension);
+
+#if defined(ENABLE_THEMES)
+ if (extension->is_theme()) {
+ // Now that the theme extension is visible from outside the
+ // ExtensionService, notify the ThemeService about the
+ // newly-installed theme.
+ ThemeServiceFactory::GetForProfile(profile_)->SetTheme(extension);
+ }
+#endif
}
void ExtensionService::AddComponentExtension(const Extension* extension) {
« no previous file with comments | « no previous file | chrome/browser/themes/theme_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698