| Index: chrome/app/chrome_dll_main.cc
|
| ===================================================================
|
| --- chrome/app/chrome_dll_main.cc (revision 46945)
|
| +++ chrome/app/chrome_dll_main.cc (working copy)
|
| @@ -103,6 +103,7 @@
|
| #if defined(_WIN64)
|
| extern int NaClBrokerMain(const MainFunctionParams&);
|
| #endif
|
| +extern int ServiceProcessMain(const MainFunctionParams&);
|
|
|
| #if defined(OS_WIN)
|
| // TODO(erikkay): isn't this already defined somewhere?
|
| @@ -263,7 +264,8 @@
|
| score = kPluginScore;
|
| } else if (process_type == switches::kUtilityProcess ||
|
| process_type == switches::kWorkerProcess ||
|
| - process_type == switches::kGpuProcess) {
|
| + process_type == switches::kGpuProcess ||
|
| + process_type == switches::kServiceProcess) {
|
| score = kMiscScore;
|
| } else if (process_type == switches::kProfileImportProcess) {
|
| NOTIMPLEMENTED();
|
| @@ -367,6 +369,14 @@
|
| process_type == switches::kUtilityProcess;
|
| }
|
|
|
| +// Returns true if this process is a child of the browser process.
|
| +bool SubprocessIsBrowserChild(const std::string& process_type) {
|
| + if (process_type.empty() || process_type == switches::kServiceProcess) {
|
| + return false;
|
| + }
|
| + return true;
|
| +}
|
| +
|
| #if defined(OS_MACOSX)
|
| // Update the name shown in Activity Monitor so users are less likely to ask
|
| // why Chrome has so many processes.
|
| @@ -513,7 +523,7 @@
|
| base::ProcessId browser_pid;
|
| if (process_type.empty()) {
|
| browser_pid = base::GetCurrentProcId();
|
| - } else {
|
| + } else if (SubprocessIsBrowserChild(process_type)) {
|
| #if defined(OS_WIN)
|
| std::wstring channel_name =
|
| parsed_command_line.GetSwitchValue(switches::kProcessChannelID);
|
| @@ -780,6 +790,8 @@
|
| #else
|
| NOTIMPLEMENTED();
|
| #endif
|
| + } else if (process_type == switches::kServiceProcess) {
|
| + rv = ServiceProcessMain(main_params);
|
| } else if (process_type.empty()) {
|
| #if defined(OS_LINUX)
|
| const char* sandbox_binary = NULL;
|
|
|