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

Side by Side Diff: content/browser/utility_process_host.cc

Issue 8071013: Finish moving plugin probing out of process. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/browser/utility_process_host.h" 5 #include "content/browser/utility_process_host.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/message_loop.h" 8 #include "base/message_loop.h"
9 #include "base/utf_string_conversions.h" 9 #include "base/utf_string_conversions.h"
10 #include "content/browser/content_browser_client.h" 10 #include "content/browser/content_browser_client.h"
11 #include "content/common/content_switches.h" 11 #include "content/common/content_switches.h"
12 #include "content/common/utility_messages.h" 12 #include "content/common/utility_messages.h"
13 #include "ipc/ipc_switches.h" 13 #include "ipc/ipc_switches.h"
14 #include "ui/base/ui_base_switches.h" 14 #include "ui/base/ui_base_switches.h"
15 #include "webkit/plugins/plugin_switches.h"
15 16
16 UtilityProcessHost::Client::Client() { 17 UtilityProcessHost::Client::Client() {
17 } 18 }
18 19
19 UtilityProcessHost::Client::~Client() { 20 UtilityProcessHost::Client::~Client() {
20 } 21 }
21 22
22 void UtilityProcessHost::Client::OnProcessCrashed(int exit_code) { 23 void UtilityProcessHost::Client::OnProcessCrashed(int exit_code) {
23 } 24 }
24 25
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 cmd_line->AppendSwitchASCII(switches::kProcessChannelID, channel_id()); 97 cmd_line->AppendSwitchASCII(switches::kProcessChannelID, channel_id());
97 std::string locale = 98 std::string locale =
98 content::GetContentClient()->browser()->GetApplicationLocale(); 99 content::GetContentClient()->browser()->GetApplicationLocale();
99 cmd_line->AppendSwitchASCII(switches::kLang, locale); 100 cmd_line->AppendSwitchASCII(switches::kLang, locale);
100 101
101 const CommandLine& browser_command_line = *CommandLine::ForCurrentProcess(); 102 const CommandLine& browser_command_line = *CommandLine::ForCurrentProcess();
102 if (browser_command_line.HasSwitch(switches::kChromeFrame)) 103 if (browser_command_line.HasSwitch(switches::kChromeFrame))
103 cmd_line->AppendSwitch(switches::kChromeFrame); 104 cmd_line->AppendSwitch(switches::kChromeFrame);
104 if (no_sandbox_ || browser_command_line.HasSwitch(switches::kNoSandbox)) 105 if (no_sandbox_ || browser_command_line.HasSwitch(switches::kNoSandbox))
105 cmd_line->AppendSwitch(switches::kNoSandbox); 106 cmd_line->AppendSwitch(switches::kNoSandbox);
107 if (browser_command_line.HasSwitch(switches::kDebugPluginLoading))
108 cmd_line->AppendSwitch(switches::kDebugPluginLoading);
106 109
107 #if defined(OS_POSIX) 110 #if defined(OS_POSIX)
108 // TODO(port): Sandbox this on Linux. Also, zygote this to work with 111 // TODO(port): Sandbox this on Linux. Also, zygote this to work with
109 // Linux updating. 112 // Linux updating.
110 bool has_cmd_prefix = browser_command_line.HasSwitch( 113 bool has_cmd_prefix = browser_command_line.HasSwitch(
111 switches::kUtilityCmdPrefix); 114 switches::kUtilityCmdPrefix);
112 if (has_cmd_prefix) { 115 if (has_cmd_prefix) {
113 // launch the utility child process with some prefix (usually "xterm -e gdb 116 // launch the utility child process with some prefix (usually "xterm -e gdb
114 // --args"). 117 // --args").
115 cmd_line->PrependWrapper(browser_command_line.GetSwitchValueNative( 118 cmd_line->PrependWrapper(browser_command_line.GetSwitchValueNative(
(...skipping 24 matching lines...) Expand all
140 143
141 void UtilityProcessHost::OnProcessCrashed(int exit_code) { 144 void UtilityProcessHost::OnProcessCrashed(int exit_code) {
142 BrowserThread::PostTask( 145 BrowserThread::PostTask(
143 client_thread_id_, FROM_HERE, 146 client_thread_id_, FROM_HERE,
144 NewRunnableMethod(client_.get(), &Client::OnProcessCrashed, exit_code)); 147 NewRunnableMethod(client_.get(), &Client::OnProcessCrashed, exit_code));
145 } 148 }
146 149
147 bool UtilityProcessHost::CanShutdown() { 150 bool UtilityProcessHost::CanShutdown() {
148 return true; 151 return true;
149 } 152 }
OLDNEW
« no previous file with comments | « content/browser/renderer_host/render_message_filter.cc ('k') | webkit/plugins/npapi/plugin_lib_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698