OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/service/service_utility_process_host.h" | 5 #include "chrome/service/service_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 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
76 | 76 |
77 FilePath exe_path = GetUtilityProcessCmd(); | 77 FilePath exe_path = GetUtilityProcessCmd(); |
78 if (exe_path.empty()) { | 78 if (exe_path.empty()) { |
79 NOTREACHED() << "Unable to get utility process binary name."; | 79 NOTREACHED() << "Unable to get utility process binary name."; |
80 return false; | 80 return false; |
81 } | 81 } |
82 | 82 |
83 CommandLine cmd_line(exe_path); | 83 CommandLine cmd_line(exe_path); |
84 cmd_line.AppendSwitchWithValue(switches::kProcessType, | 84 cmd_line.AppendSwitchWithValue(switches::kProcessType, |
85 switches::kUtilityProcess); | 85 switches::kUtilityProcess); |
86 cmd_line.AppendSwitchWithValue(switches::kProcessChannelID, | 86 cmd_line.AppendSwitchWithValue(switches::kProcessChannelID, channel_id()); |
87 ASCIIToWide(channel_id())); | |
88 cmd_line.AppendSwitch(switches::kLang); | 87 cmd_line.AppendSwitch(switches::kLang); |
89 | 88 |
90 return Launch(&cmd_line); | 89 return Launch(&cmd_line); |
91 } | 90 } |
92 | 91 |
93 FilePath ServiceUtilityProcessHost::GetUtilityProcessCmd() { | 92 FilePath ServiceUtilityProcessHost::GetUtilityProcessCmd() { |
94 return GetChildPath(true); | 93 return GetChildPath(true); |
95 } | 94 } |
96 | 95 |
97 void ServiceUtilityProcessHost::OnChildDied() { | 96 void ServiceUtilityProcessHost::OnChildDied() { |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
138 IPC_BEGIN_MESSAGE_MAP(ServiceUtilityProcessHost, message) | 137 IPC_BEGIN_MESSAGE_MAP(ServiceUtilityProcessHost, message) |
139 #if defined(OS_WIN) | 138 #if defined(OS_WIN) |
140 IPC_MESSAGE_HANDLER(UtilityHostMsg_RenderPDFPagesToMetafile_Succeeded, | 139 IPC_MESSAGE_HANDLER(UtilityHostMsg_RenderPDFPagesToMetafile_Succeeded, |
141 Client::OnRenderPDFPagesToMetafileSucceeded) | 140 Client::OnRenderPDFPagesToMetafileSucceeded) |
142 #endif // OS_WIN | 141 #endif // OS_WIN |
143 IPC_MESSAGE_HANDLER(UtilityHostMsg_RenderPDFPagesToMetafile_Failed, | 142 IPC_MESSAGE_HANDLER(UtilityHostMsg_RenderPDFPagesToMetafile_Failed, |
144 Client::OnRenderPDFPagesToMetafileFailed) | 143 Client::OnRenderPDFPagesToMetafileFailed) |
145 IPC_END_MESSAGE_MAP_EX() | 144 IPC_END_MESSAGE_MAP_EX() |
146 } | 145 } |
147 | 146 |
OLD | NEW |