| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 "chrome/browser/utility_process_host.h" | 5 #include "chrome/browser/utility_process_host.h" |
| 6 | 6 |
| 7 #include "app/app_switches.h" | 7 #include "app/app_switches.h" |
| 8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
| 9 #include "base/file_util.h" | 9 #include "base/file_util.h" |
| 10 #include "base/message_loop.h" | 10 #include "base/message_loop.h" |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 71 if (!CreateChannel()) | 71 if (!CreateChannel()) |
| 72 return false; | 72 return false; |
| 73 | 73 |
| 74 FilePath exe_path = GetUtilityProcessCmd(); | 74 FilePath exe_path = GetUtilityProcessCmd(); |
| 75 if (exe_path.empty()) { | 75 if (exe_path.empty()) { |
| 76 NOTREACHED() << "Unable to get utility process binary name."; | 76 NOTREACHED() << "Unable to get utility process binary name."; |
| 77 return false; | 77 return false; |
| 78 } | 78 } |
| 79 | 79 |
| 80 CommandLine* cmd_line = new CommandLine(exe_path); | 80 CommandLine* cmd_line = new CommandLine(exe_path); |
| 81 cmd_line->AppendSwitchWithValue(switches::kProcessType, | 81 cmd_line->AppendSwitchASCII(switches::kProcessType, |
| 82 switches::kUtilityProcess); | 82 switches::kUtilityProcess); |
| 83 cmd_line->AppendSwitchWithValue(switches::kProcessChannelID, channel_id()); | 83 cmd_line->AppendSwitchASCII(switches::kProcessChannelID, channel_id()); |
| 84 std::string locale = g_browser_process->GetApplicationLocale(); | 84 std::string locale = g_browser_process->GetApplicationLocale(); |
| 85 cmd_line->AppendSwitchWithValue(switches::kLang, locale); | 85 cmd_line->AppendSwitchASCII(switches::kLang, locale); |
| 86 | 86 |
| 87 SetCrashReporterCommandLine(cmd_line); | 87 SetCrashReporterCommandLine(cmd_line); |
| 88 | 88 |
| 89 const CommandLine& browser_command_line = *CommandLine::ForCurrentProcess(); | 89 const CommandLine& browser_command_line = *CommandLine::ForCurrentProcess(); |
| 90 if (browser_command_line.HasSwitch(switches::kChromeFrame)) | 90 if (browser_command_line.HasSwitch(switches::kChromeFrame)) |
| 91 cmd_line->AppendSwitch(switches::kChromeFrame); | 91 cmd_line->AppendSwitch(switches::kChromeFrame); |
| 92 | 92 |
| 93 if (browser_command_line.HasSwitch(switches::kEnableApps)) | 93 if (browser_command_line.HasSwitch(switches::kEnableApps)) |
| 94 cmd_line->AppendSwitch(switches::kEnableApps); | 94 cmd_line->AppendSwitch(switches::kEnableApps); |
| 95 | 95 |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 154 IPC_MESSAGE_HANDLER(UtilityHostMsg_ParseUpdateManifest_Succeeded, | 154 IPC_MESSAGE_HANDLER(UtilityHostMsg_ParseUpdateManifest_Succeeded, |
| 155 Client::OnParseUpdateManifestSucceeded) | 155 Client::OnParseUpdateManifestSucceeded) |
| 156 IPC_MESSAGE_HANDLER(UtilityHostMsg_ParseUpdateManifest_Failed, | 156 IPC_MESSAGE_HANDLER(UtilityHostMsg_ParseUpdateManifest_Failed, |
| 157 Client::OnParseUpdateManifestFailed) | 157 Client::OnParseUpdateManifestFailed) |
| 158 IPC_MESSAGE_HANDLER(UtilityHostMsg_DecodeImage_Succeeded, | 158 IPC_MESSAGE_HANDLER(UtilityHostMsg_DecodeImage_Succeeded, |
| 159 Client::OnDecodeImageSucceeded) | 159 Client::OnDecodeImageSucceeded) |
| 160 IPC_MESSAGE_HANDLER(UtilityHostMsg_DecodeImage_Failed, | 160 IPC_MESSAGE_HANDLER(UtilityHostMsg_DecodeImage_Failed, |
| 161 Client::OnDecodeImageFailed) | 161 Client::OnDecodeImageFailed) |
| 162 IPC_END_MESSAGE_MAP_EX() | 162 IPC_END_MESSAGE_MAP_EX() |
| 163 } | 163 } |
| OLD | NEW |