Index: chrome/browser/extensions/extension_message_service.cc |
=================================================================== |
--- chrome/browser/extensions/extension_message_service.cc (revision 94334) |
+++ chrome/browser/extensions/extension_message_service.cc (working copy) |
@@ -143,13 +143,12 @@ |
RenderProcessHost* source = RenderProcessHost::FromID(source_process_id); |
if (!source) |
return; |
- Profile* profile = Profile::FromBrowserContext(source->browser_context()); |
// Note: we use the source's profile here. If the source is an incognito |
// process, we will use the incognito EPM to find the right extension process, |
// which depends on whether the extension uses spanning or split mode. |
MessagePort receiver( |
- profile->GetExtensionProcessManager()->GetExtensionProcess( |
+ source->profile()->GetExtensionProcessManager()->GetExtensionProcess( |
target_extension_id), |
MSG_ROUTING_CONTROL); |
TabContents* source_contents = tab_util::GetTabContentsByID( |
@@ -174,11 +173,10 @@ |
RenderProcessHost* source = RenderProcessHost::FromID(source_process_id); |
if (!source) |
return; |
- Profile* profile = Profile::FromBrowserContext(source->browser_context()); |
TabContentsWrapper* contents = NULL; |
MessagePort receiver; |
- if (ExtensionTabUtil::GetTabById(tab_id, profile, true, |
+ if (ExtensionTabUtil::GetTabById(tab_id, source->profile(), true, |
NULL, NULL, &contents, NULL)) { |
receiver.sender = contents->render_view_host(); |
receiver.routing_id = contents->render_view_host()->routing_id(); |