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 97ea32ef00c907591f14456836f227fe14fbb610..dd7eb74d1a5d422ae02fe85eb8b4ee9ab2f59378 100644 |
| --- a/chrome/browser/extensions/extension_service.cc |
| +++ b/chrome/browser/extensions/extension_service.cc |
| @@ -45,6 +45,8 @@ |
| #include "chrome/browser/extensions/updater/extension_updater.h" |
| #include "chrome/browser/google/google_brand.h" |
| #include "chrome/browser/profiles/profile.h" |
| +#include "chrome/browser/themes/theme_service.h" |
| +#include "chrome/browser/themes/theme_service_factory.h" |
| #include "chrome/browser/ui/webui/extensions/extension_icon_source.h" |
| #include "chrome/browser/ui/webui/favicon_source.h" |
| #include "chrome/browser/ui/webui/ntp/thumbnail_source.h" |
| @@ -1074,6 +1076,10 @@ void ExtensionService::NotifyExtensionLoaded(const Extension* extension) { |
| content::Source<Profile>(profile_), |
| content::Details<const Extension>(extension)); |
| + ThemeServiceFactory::GetForProfile(profile_) |
|
not at google - send to devlin
2015/03/09 16:32:40
The point of Observers is so that ExtensionService
limasdf
2015/03/10 16:46:16
To make ThemeServiceFactory as ExtensionRegistryOb
not at google - send to devlin
2015/03/10 16:50:18
Seems like overkill. +thestig has a lot of experie
|
| + ->extension_observer() |
| + .OnExtensionLoaded(extension); |
| + |
| // TODO(kalman): Convert ExtensionSpecialStoragePolicy to a |
| // BrowserContextKeyedService and use ExtensionRegistryObserver. |
| profile_->GetExtensionSpecialStoragePolicy()-> |
| @@ -1122,6 +1128,13 @@ void ExtensionService::NotifyExtensionUnloaded( |
| content::Source<Profile>(profile_), |
| content::Details<UnloadedExtensionInfo>(&details)); |
| + if (reason != UnloadedExtensionInfo::REASON_UPDATE && |
| + reason != UnloadedExtensionInfo::REASON_LOCK_ALL) { |
| + ThemeServiceFactory::GetForProfile(profile_) |
| + ->extension_observer() |
| + .OnExtensionUnloaded(extension); |
| + } |
| + |
| for (content::RenderProcessHost::iterator i( |
| content::RenderProcessHost::AllHostsIterator()); |
| !i.IsAtEnd(); i.Advance()) { |
| @@ -1982,6 +1995,10 @@ void ExtensionService::FinishInstallation( |
| registry_->TriggerOnWillBeInstalled( |
| extension, is_update, from_ephemeral, old_name); |
| + ThemeServiceFactory::GetForProfile(profile_) |
| + ->extension_observer() |
| + .OnExtensionWillBeInstalled(extension); |
| + |
| // Unpacked extensions default to allowing file access, but if that has been |
| // overridden, don't reset the value. |
| if (Manifest::ShouldAlwaysAllowFileAccess(extension->location()) && |