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

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

Issue 965233002: Remove deprecated extension notification from theme_service (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove ExtensionRegistryObserver and Call from ExtensionService instead. Created 5 years, 9 months 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') | chrome/browser/themes/theme_service.h » ('J')
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 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()) &&
« no previous file with comments | « no previous file | chrome/browser/themes/theme_service.h » ('j') | chrome/browser/themes/theme_service.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698