| 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> |
| (...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 156 #endif | 156 #endif |
| 157 | 157 |
| 158 return true; | 158 return true; |
| 159 } | 159 } |
| 160 | 160 |
| 161 void NaClProcessHost::OnProcessLaunchedByBroker(base::ProcessHandle handle) { | 161 void NaClProcessHost::OnProcessLaunchedByBroker(base::ProcessHandle handle) { |
| 162 set_handle(handle); | 162 set_handle(handle); |
| 163 OnProcessLaunched(); | 163 OnProcessLaunched(); |
| 164 } | 164 } |
| 165 | 165 |
| 166 bool NaClProcessHost::DidChildCrash() { | 166 base::TerminationStatus NaClProcessHost::GetChildTerminationStatus( |
| 167 int* exit_code) { |
| 167 if (running_on_wow64_) | 168 if (running_on_wow64_) |
| 168 return base::DidProcessCrash(NULL, handle()); | 169 return base::GetTerminationStatus(handle(), exit_code); |
| 169 return BrowserChildProcessHost::DidChildCrash(); | 170 return BrowserChildProcessHost::GetChildTerminationStatus(exit_code); |
| 170 } | 171 } |
| 171 | 172 |
| 172 void NaClProcessHost::OnChildDied() { | 173 void NaClProcessHost::OnChildDied() { |
| 173 #if defined(OS_WIN) | 174 #if defined(OS_WIN) |
| 174 NaClBrokerService::GetInstance()->OnLoaderDied(); | 175 NaClBrokerService::GetInstance()->OnLoaderDied(); |
| 175 #endif | 176 #endif |
| 176 BrowserChildProcessHost::OnChildDied(); | 177 BrowserChildProcessHost::OnChildDied(); |
| 177 } | 178 } |
| 178 | 179 |
| 179 void NaClProcessHost::OnProcessLaunched() { | 180 void NaClProcessHost::OnProcessLaunched() { |
| (...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 304 if (fnIsWow64Process != NULL) { | 305 if (fnIsWow64Process != NULL) { |
| 305 BOOL bIsWow64 = FALSE; | 306 BOOL bIsWow64 = FALSE; |
| 306 if (fnIsWow64Process(GetCurrentProcess(),&bIsWow64)) { | 307 if (fnIsWow64Process(GetCurrentProcess(),&bIsWow64)) { |
| 307 if (bIsWow64) { | 308 if (bIsWow64) { |
| 308 running_on_wow64_ = true; | 309 running_on_wow64_ = true; |
| 309 } | 310 } |
| 310 } | 311 } |
| 311 } | 312 } |
| 312 } | 313 } |
| 313 #endif | 314 #endif |
| OLD | NEW |