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 "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/file_util.h" | 8 #include "base/file_util.h" |
9 #include "base/message_loop.h" | 9 #include "base/message_loop.h" |
10 #include "base/path_service.h" | 10 #include "base/path_service.h" |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
57 | 57 |
58 Send(new UtilityMsg_ParseUpdateManifest(xml)); | 58 Send(new UtilityMsg_ParseUpdateManifest(xml)); |
59 return true; | 59 return true; |
60 } | 60 } |
61 | 61 |
62 std::wstring UtilityProcessHost::GetUtilityProcessCmd() { | 62 std::wstring UtilityProcessHost::GetUtilityProcessCmd() { |
63 return GetChildPath(); | 63 return GetChildPath(); |
64 } | 64 } |
65 | 65 |
66 bool UtilityProcessHost::StartProcess(const FilePath& exposed_dir) { | 66 bool UtilityProcessHost::StartProcess(const FilePath& exposed_dir) { |
| 67 #if defined(OS_POSIX) |
| 68 // TODO(port): We should not reach here on linux (crbug.com/22703) or |
| 69 // MacOS (crbug.com/8102) until problems related to autoupdate are fixed. |
| 70 NOTREACHED(); |
| 71 return false; |
| 72 #endif |
| 73 |
67 // Name must be set or metrics_service will crash in any test which | 74 // Name must be set or metrics_service will crash in any test which |
68 // launches a UtilityProcessHost. | 75 // launches a UtilityProcessHost. |
69 set_name(L"utility process"); | 76 set_name(L"utility process"); |
70 | 77 |
71 if (!CreateChannel()) | 78 if (!CreateChannel()) |
72 return false; | 79 return false; |
73 | 80 |
74 std::wstring exe_path = GetUtilityProcessCmd(); | 81 std::wstring exe_path = GetUtilityProcessCmd(); |
75 if (exe_path.empty()) { | 82 if (exe_path.empty()) { |
76 NOTREACHED() << "Unable to get utility process binary name."; | 83 NOTREACHED() << "Unable to get utility process binary name."; |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
149 IPC_MESSAGE_HANDLER(UtilityHostMsg_UnpackWebResource_Succeeded, | 156 IPC_MESSAGE_HANDLER(UtilityHostMsg_UnpackWebResource_Succeeded, |
150 Client::OnUnpackWebResourceSucceeded) | 157 Client::OnUnpackWebResourceSucceeded) |
151 IPC_MESSAGE_HANDLER(UtilityHostMsg_UnpackWebResource_Failed, | 158 IPC_MESSAGE_HANDLER(UtilityHostMsg_UnpackWebResource_Failed, |
152 Client::OnUnpackWebResourceFailed) | 159 Client::OnUnpackWebResourceFailed) |
153 IPC_MESSAGE_HANDLER(UtilityHostMsg_ParseUpdateManifest_Succeeded, | 160 IPC_MESSAGE_HANDLER(UtilityHostMsg_ParseUpdateManifest_Succeeded, |
154 Client::OnParseUpdateManifestSucceeded) | 161 Client::OnParseUpdateManifestSucceeded) |
155 IPC_MESSAGE_HANDLER(UtilityHostMsg_ParseUpdateManifest_Failed, | 162 IPC_MESSAGE_HANDLER(UtilityHostMsg_ParseUpdateManifest_Failed, |
156 Client::OnParseUpdateManifestFailed) | 163 Client::OnParseUpdateManifestFailed) |
157 IPC_END_MESSAGE_MAP_EX() | 164 IPC_END_MESSAGE_MAP_EX() |
158 } | 165 } |
OLD | NEW |