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

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

Issue 11416324: Revert changes to have ExtensionService notify ThemeService directly (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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 | « chrome/browser/extensions/extension_install_ui_default.cc ('k') | 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 970873359b1de7408e5fc92521563b1eb7e3f9ac..a10372ecd07d6a56aa87682c196f724c959538f8 100644
--- a/chrome/browser/extensions/extension_service.cc
+++ b/chrome/browser/extensions/extension_service.cc
@@ -80,6 +80,8 @@
#include "chrome/browser/profiles/profile_manager.h"
#include "chrome/browser/search_engines/template_url_service.h"
#include "chrome/browser/search_engines/template_url_service_factory.h"
+#include "chrome/browser/themes/theme_service.h"
+#include "chrome/browser/themes/theme_service_factory.h"
#include "chrome/browser/ui/webui/chrome_url_data_manager.h"
#include "chrome/browser/ui/webui/favicon_source.h"
#include "chrome/browser/ui/webui/ntp/thumbnail_source.h"
@@ -116,11 +118,6 @@
#include "webkit/database/database_tracker.h"
#include "webkit/database/database_util.h"
-#if defined(ENABLE_THEMES)
-#include "chrome/browser/themes/theme_service.h"
-#include "chrome/browser/themes/theme_service_factory.h"
-#endif
-
#if defined(OS_CHROMEOS)
#include "chrome/browser/chromeos/cros/cros_library.h"
#include "chrome/browser/chromeos/extensions/file_browser_event_router.h"
@@ -1034,9 +1031,9 @@ void ExtensionService::NotifyExtensionLoaded(const Extension* extension) {
// extension.
system_->RegisterExtensionWithRequestContexts(extension);
+ // Tell renderers about the new extension, unless it's a theme (renderers
+ // don't need to know about themes).
if (!extension->is_theme()) {
- // Tell renderers about non-theme extensions (renderers don't need
- // to know about themes).
for (content::RenderProcessHost::iterator i(
content::RenderProcessHost::AllHostsIterator());
!i.IsAtEnd(); i.Advance()) {
@@ -2029,7 +2026,7 @@ void ExtensionService::GarbageCollectExtensions() {
// defensive; in the future, we may call GarbageCollectExtensions()
// from somewhere other than Init() (e.g., in a timer).
if (profile_) {
- ThemeService::RemoveUnusedThemesForProfile(profile_);
+ ThemeServiceFactory::GetForProfile(profile_)->RemoveUnusedThemes();
}
#endif
}
@@ -2110,13 +2107,6 @@ 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
}
void ExtensionService::AddComponentExtension(const Extension* extension) {
« no previous file with comments | « chrome/browser/extensions/extension_install_ui_default.cc ('k') | chrome/browser/themes/theme_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698