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

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

Issue 8480007: Change EXTENSION_PROCESS_CREATED observers to use EXTENSION_HOST_CREATED. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: host it Created 9 years, 1 month 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
Index: chrome/browser/extensions/extension_host.cc
diff --git a/chrome/browser/extensions/extension_host.cc b/chrome/browser/extensions/extension_host.cc
index 8b2eba128425d419f8fb1817bd238477b0d207d1..6eea12c7d7e04dc871cf757c1bbb35cc8f871b19 100644
--- a/chrome/browser/extensions/extension_host.cc
+++ b/chrome/browser/extensions/extension_host.cc
@@ -148,10 +148,6 @@ ExtensionHost::ExtensionHost(const Extension* extension,
if (enable_dom_automation_)
render_view_host_->AllowBindings(content::BINDINGS_POLICY_DOM_AUTOMATION);
- // Listen for when the render process' handle is available so we can add it
- // to the task manager then.
- registrar_.Add(this, content::NOTIFICATION_RENDERER_PROCESS_CREATED,
- content::Source<RenderProcessHost>(render_process_host()));
// Listen for when an extension is unloaded from the same profile, as it may
// be the same extension that this points to.
registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_UNLOADED,
@@ -297,12 +293,6 @@ void ExtensionHost::Observe(int type,
IsBackgroundPageReady(extension_));
NavigateToURL(url_);
break;
- case content::NOTIFICATION_RENDERER_PROCESS_CREATED:
- content::NotificationService::current()->Notify(
- chrome::NOTIFICATION_EXTENSION_PROCESS_CREATED,
- content::Source<Profile>(profile_),
- content::Details<ExtensionHost>(this));
- break;
case chrome::NOTIFICATION_EXTENSION_UNLOADED:
// The extension object will be deleted after this notification has been
// sent. NULL it out so that dirty pointer issues don't arise in cases
@@ -808,4 +798,10 @@ void ExtensionHost::RenderViewCreated(RenderViewHost* render_view_host) {
render_view_host->EnablePreferredSizeMode(
kPreferredSizeWidth | kPreferredSizeHeightThisIsSlow);
}
+ Profile* profile = Profile::FromBrowserContext(
+ render_view_host->process()->browser_context());
Aaron Boodman 2011/11/08 01:11:53 There's a profile_ pointer in ExtensionHost :-).
+ content::NotificationService::current()->Notify(
+ chrome::NOTIFICATION_EXTENSION_HOST_CREATED,
+ content::Source<Profile>(profile),
+ content::Details<ExtensionHost>(this));
}
« no previous file with comments | « chrome/browser/extensions/extension_browsertest.cc ('k') | chrome/browser/extensions/extension_process_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698