Index: chrome/renderer/chrome_content_renderer_client.cc |
diff --git a/chrome/renderer/chrome_content_renderer_client.cc b/chrome/renderer/chrome_content_renderer_client.cc |
index 5f3b5c47af3f2084d3a1f518656e166a051c6210..bae094a4213b30e87fc8313c3379b14a380c7ad6 100644 |
--- a/chrome/renderer/chrome_content_renderer_client.cc |
+++ b/chrome/renderer/chrome_content_renderer_client.cc |
@@ -283,6 +283,12 @@ GURL GetPluginInstancePosterImage(const blink::WebPluginParams& params, |
} |
#endif |
+#if defined(ENABLE_EXTENSIONS) |
+bool IsStandaloneExtensionProcess() { |
+ return base::CommandLine::ForCurrentProcess()->HasSwitch( |
+ extensions::switches::kExtensionProcess); |
+} |
+#endif |
} // namespace |
ChromeContentRendererClient::ChromeContentRendererClient() { |
@@ -1160,7 +1166,7 @@ void ChromeContentRendererClient::GetNavigationErrorStrings( |
bool ChromeContentRendererClient::RunIdleHandlerWhenWidgetsHidden() { |
#if defined(ENABLE_EXTENSIONS) |
- return !extension_dispatcher_->is_extension_process(); |
+ return !IsStandaloneExtensionProcess(); |
#else |
return true; |
#endif |
@@ -1275,7 +1281,7 @@ bool ChromeContentRendererClient::ShouldFork(WebFrame* frame, |
// in a normal process, or if it's a process for an extension that has been |
// uninstalled. |
if (frame->top()->document().url() == url) { |
- if (is_extension_url != extension_dispatcher_->is_extension_process()) |
+ if (is_extension_url != IsStandaloneExtensionProcess()) |
return true; |
} |
#endif // defined(ENABLE_EXTENSIONS) |
@@ -1399,7 +1405,7 @@ bool ChromeContentRendererClient::CrossesExtensionExtents( |
opener_document.url()) != NULL; |
if (!is_extension_url && |
!opener_is_extension_url && |
- extension_dispatcher_->is_extension_process() && |
+ IsStandaloneExtensionProcess() && |
opener.canRequest(WebURL(new_url))) |
return false; |