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)); |
} |