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

Unified Diff: chrome/browser/chrome_content_browser_client.cc

Issue 8113035: Remove RenderProcessHost::is_extension_process (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: updates Created 9 years, 2 months 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 | « chrome/browser/chrome_content_browser_client.h ('k') | chrome/browser/extensions/app_process_apitest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chrome_content_browser_client.cc
diff --git a/chrome/browser/chrome_content_browser_client.cc b/chrome/browser/chrome_content_browser_client.cc
index 4709e327f89d2f5602a9fcc1afc94f195fef5454..ea9fa3055991e3f605c8c03c42d0bc3a3cd6e3fc 100644
--- a/chrome/browser/chrome_content_browser_client.cc
+++ b/chrome/browser/chrome_content_browser_client.cc
@@ -266,9 +266,7 @@ bool ChromeContentBrowserClient::IsSuitableHost(
return true;
bool is_extension_host =
- process_host->is_extension_process() ||
- extension_process_manager->AreBindingsEnabledForProcess(
- process_host->id());
+ extension_process_manager->IsExtensionProcess(process_host->id());
return site_url.SchemeIs(chrome::kExtensionScheme) == is_extension_host;
}
@@ -297,8 +295,7 @@ void ChromeContentBrowserClient::AppendExtraCommandLineSwitches(
std::string process_type =
command_line->GetSwitchValueASCII(switches::kProcessType);
const CommandLine& browser_command_line = *CommandLine::ForCurrentProcess();
- if (process_type == switches::kExtensionProcess ||
- process_type == switches::kRendererProcess) {
+ if (process_type == switches::kRendererProcess) {
FilePath user_data_dir =
browser_command_line.GetSwitchValuePath(switches::kUserDataDir);
if (!user_data_dir.empty())
@@ -313,6 +310,14 @@ void ChromeContentBrowserClient::AppendExtraCommandLineSwitches(
RenderProcessHost* process = RenderProcessHost::FromID(child_process_id);
Profile* profile = Profile::FromBrowserContext(process->browser_context());
+
+ ExtensionProcessManager* extension_process_manager =
+ profile->GetExtensionProcessManager();
+ if (extension_process_manager->IsExtensionProcess(
+ process->id())) {
+ command_line->AppendSwitch(switches::kExtensionProcess);
+ }
+
PrefService* prefs = profile->GetPrefs();
// Currently this pref is only registered if applied via a policy.
if (prefs->HasPrefPath(prefs::kDisable3DAPIs) &&
@@ -795,16 +800,19 @@ FilePath ChromeContentBrowserClient::GetDefaultDownloadDirectory() {
#if defined(OS_LINUX)
int ChromeContentBrowserClient::GetCrashSignalFD(
- const std::string& process_type) {
- if (process_type == switches::kRendererProcess)
- return RendererCrashHandlerHostLinux::GetInstance()->GetDeathSignalSocket();
-
- if (process_type == switches::kExtensionProcess) {
+ const CommandLine& command_line) {
+ if (command_line.HasSwitch(switches::kExtensionProcess)) {
ExtensionCrashHandlerHostLinux* crash_handler =
ExtensionCrashHandlerHostLinux::GetInstance();
return crash_handler->GetDeathSignalSocket();
}
+ std::string process_type =
+ command_line.GetSwitchValueASCII(switches::kProcessType);
+
+ if (process_type == switches::kRendererProcess)
+ return RendererCrashHandlerHostLinux::GetInstance()->GetDeathSignalSocket();
+
if (process_type == switches::kPluginProcess)
return PluginCrashHandlerHostLinux::GetInstance()->GetDeathSignalSocket();
« no previous file with comments | « chrome/browser/chrome_content_browser_client.h ('k') | chrome/browser/extensions/app_process_apitest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698