Chromium Code Reviews| 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) { |