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

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

Issue 8976003: Extensions: send the whole manifest to the extensions process in (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: don't send themes Created 9 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 | « no previous file | chrome/common/extensions/extension_messages.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 c5fd28c1029451bfae8dbc9c7633ac29263acf4a..ddb3d355a657b0b9a4ec48629b238f3afd87eba3 100644
--- a/chrome/browser/extensions/extension_service.cc
+++ b/chrome/browser/extensions/extension_service.cc
@@ -931,18 +931,22 @@ void ExtensionService::NotifyExtensionLoaded(const Extension* extension) {
content::Source<Profile>(profile_),
content::Details<const Extension>(extension));
- // Tell renderers about the new extension.
- for (content::RenderProcessHost::iterator i(
- content::RenderProcessHost::AllHostsIterator());
- !i.IsAtEnd(); i.Advance()) {
- content::RenderProcessHost* host = i.GetCurrentValue();
- Profile* host_profile =
- Profile::FromBrowserContext(host->GetBrowserContext());
- if (host_profile->GetOriginalProfile() == profile_->GetOriginalProfile()) {
- std::vector<ExtensionMsg_Loaded_Params> loaded_extensions(
- 1, ExtensionMsg_Loaded_Params(extension));
- host->Send(
- new ExtensionMsg_Loaded(loaded_extensions));
+ // Tell renderers about the new extension, unless it's a theme (renderers
+ // don't need to know about themes).
+ if (!extension->is_theme()) {
+ for (content::RenderProcessHost::iterator i(
+ content::RenderProcessHost::AllHostsIterator());
+ !i.IsAtEnd(); i.Advance()) {
+ content::RenderProcessHost* host = i.GetCurrentValue();
+ Profile* host_profile =
+ Profile::FromBrowserContext(host->GetBrowserContext());
+ if (host_profile->GetOriginalProfile() ==
+ profile_->GetOriginalProfile()) {
+ std::vector<ExtensionMsg_Loaded_Params> loaded_extensions(
+ 1, ExtensionMsg_Loaded_Params(extension));
+ host->Send(
+ new ExtensionMsg_Loaded(loaded_extensions));
+ }
}
}
@@ -2327,7 +2331,9 @@ void ExtensionService::Observe(int type,
std::vector<ExtensionMsg_Loaded_Params> loaded_extensions;
for (ExtensionSet::const_iterator iter = extensions_.begin();
iter != extensions_.end(); ++iter) {
- loaded_extensions.push_back(ExtensionMsg_Loaded_Params(*iter));
+ // Renderers don't need to know about themes.
+ if (!(*iter)->is_theme())
+ loaded_extensions.push_back(ExtensionMsg_Loaded_Params(*iter));
}
process->Send(new ExtensionMsg_Loaded(loaded_extensions));
break;
« no previous file with comments | « no previous file | chrome/common/extensions/extension_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698