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

Unified Diff: chrome/browser/extensions/extension_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
« no previous file with comments | « no previous file | chrome/browser/ui/gtk/gtk_theme_service.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 04da86bc33a1b5283030d223ec54bb91fdfa9268..970873359b1de7408e5fc92521563b1eb7e3f9ac 100644
--- a/chrome/browser/extensions/extension_service.cc
+++ b/chrome/browser/extensions/extension_service.cc
@@ -1034,11 +1034,7 @@ void ExtensionService::NotifyExtensionLoaded(const Extension* extension) {
// extension.
system_->RegisterExtensionWithRequestContexts(extension);
- if (extension->is_theme()) {
-#if defined(ENABLE_THEMES)
- ThemeServiceFactory::SetThemeForProfile(profile_, extension);
-#endif
- } else {
+ if (!extension->is_theme()) {
// Tell renderers about non-theme extensions (renderers don't need
// to know about themes).
for (content::RenderProcessHost::iterator i(
@@ -2114,6 +2110,13 @@ void ExtensionService::AddExtension(const Extension* extension) {
SyncExtensionChangeIfNeeded(*extension);
NotifyExtensionLoaded(extension);
DoPostLoadTasks(extension);
+
+#if defined(ENABLE_THEMES)
+ if (extension->is_theme()) {
+ // Notify the ThemeService about the newly-installed theme.
+ ThemeServiceFactory::SetThemeForProfile(profile_, extension);
+ }
+#endif
asargent_no_longer_on_chrome 2012/12/01 00:54:56 Perhaps this should go inside DoPostLoadTasks ?
akalin 2012/12/01 01:07:00 Per our chat, looks like I shouldn't do this!
}
void ExtensionService::AddComponentExtension(const Extension* extension) {
« no previous file with comments | « no previous file | chrome/browser/ui/gtk/gtk_theme_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698