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 "build/build_config.h" | 5 #include "build/build_config.h" |
6 | 6 |
7 #include "chrome/browser/nacl_host/nacl_process_host.h" | 7 #include "chrome/browser/nacl_host/nacl_process_host.h" |
8 | 8 |
9 #if defined(OS_POSIX) | 9 #if defined(OS_POSIX) |
10 #include <fcntl.h> | 10 #include <fcntl.h> |
11 #endif | 11 #endif |
12 | 12 |
13 #include "base/command_line.h" | 13 #include "base/command_line.h" |
| 14 #include "base/metrics/nacl_histogram.h" |
14 #include "base/utf_string_conversions.h" | 15 #include "base/utf_string_conversions.h" |
15 #include "chrome/browser/renderer_host/resource_message_filter.h" | 16 #include "chrome/browser/renderer_host/resource_message_filter.h" |
16 #include "chrome/common/chrome_switches.h" | 17 #include "chrome/common/chrome_switches.h" |
17 #include "chrome/common/logging_chrome.h" | 18 #include "chrome/common/logging_chrome.h" |
18 #include "chrome/common/nacl_cmd_line.h" | 19 #include "chrome/common/nacl_cmd_line.h" |
19 #include "chrome/common/nacl_messages.h" | 20 #include "chrome/common/nacl_messages.h" |
20 #include "chrome/common/render_messages.h" | 21 #include "chrome/common/render_messages.h" |
21 #include "ipc/ipc_switches.h" | 22 #include "ipc/ipc_switches.h" |
22 | 23 |
23 #if defined(OS_POSIX) | 24 #if defined(OS_POSIX) |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
107 sockets_for_renderer_.push_back(pair[0]); | 108 sockets_for_renderer_.push_back(pair[0]); |
108 sockets_for_sel_ldr_.push_back(pair[1]); | 109 sockets_for_sel_ldr_.push_back(pair[1]); |
109 SetCloseOnExec(pair[0]); | 110 SetCloseOnExec(pair[0]); |
110 SetCloseOnExec(pair[1]); | 111 SetCloseOnExec(pair[1]); |
111 } | 112 } |
112 | 113 |
113 // Launch the process | 114 // Launch the process |
114 if (!LaunchSelLdr()) { | 115 if (!LaunchSelLdr()) { |
115 return false; | 116 return false; |
116 } | 117 } |
117 | 118 UmaNaclHistogramEnumeration(NACL_STARTED); |
118 resource_message_filter_ = resource_message_filter; | 119 resource_message_filter_ = resource_message_filter; |
119 reply_msg_ = reply_msg; | 120 reply_msg_ = reply_msg; |
120 | 121 |
121 return true; | 122 return true; |
122 #endif // DISABLE_NACL | 123 #endif // DISABLE_NACL |
123 } | 124 } |
124 | 125 |
125 bool NaClProcessHost::LaunchSelLdr() { | 126 bool NaClProcessHost::LaunchSelLdr() { |
126 if (!CreateChannel()) | 127 if (!CreateChannel()) |
127 return false; | 128 return false; |
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
279 if (fnIsWow64Process != NULL) { | 280 if (fnIsWow64Process != NULL) { |
280 BOOL bIsWow64 = FALSE; | 281 BOOL bIsWow64 = FALSE; |
281 if (fnIsWow64Process(GetCurrentProcess(),&bIsWow64)) { | 282 if (fnIsWow64Process(GetCurrentProcess(),&bIsWow64)) { |
282 if (bIsWow64) { | 283 if (bIsWow64) { |
283 running_on_wow64_ = true; | 284 running_on_wow64_ = true; |
284 } | 285 } |
285 } | 286 } |
286 } | 287 } |
287 } | 288 } |
288 #endif | 289 #endif |
OLD | NEW |