| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "components/nacl/browser/nacl_process_host.h" | 5 #include "components/nacl/browser/nacl_process_host.h" |
| 6 | 6 |
| 7 #include <string.h> | 7 #include <string.h> |
| 8 #include <algorithm> | 8 #include <algorithm> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <utility> | 10 #include <utility> |
| (...skipping 298 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 309 profile_directory_(profile_directory), | 309 profile_directory_(profile_directory), |
| 310 render_view_id_(render_view_id), | 310 render_view_id_(render_view_id), |
| 311 weak_factory_(this) { | 311 weak_factory_(this) { |
| 312 process_.reset(content::BrowserChildProcessHost::Create( | 312 process_.reset(content::BrowserChildProcessHost::Create( |
| 313 static_cast<content::ProcessType>(PROCESS_TYPE_NACL_LOADER), this)); | 313 static_cast<content::ProcessType>(PROCESS_TYPE_NACL_LOADER), this)); |
| 314 | 314 |
| 315 // Set the display name so the user knows what plugin the process is running. | 315 // Set the display name so the user knows what plugin the process is running. |
| 316 // We aren't on the UI thread so getting the pref locale for language | 316 // We aren't on the UI thread so getting the pref locale for language |
| 317 // formatting isn't possible, so IDN will be lost, but this is probably OK | 317 // formatting isn't possible, so IDN will be lost, but this is probably OK |
| 318 // for this use case. | 318 // for this use case. |
| 319 process_->SetName(url_formatter::FormatUrl(manifest_url_, std::string())); | 319 process_->SetName(url_formatter::FormatUrl(manifest_url_)); |
| 320 | 320 |
| 321 enable_debug_stub_ = base::CommandLine::ForCurrentProcess()->HasSwitch( | 321 enable_debug_stub_ = base::CommandLine::ForCurrentProcess()->HasSwitch( |
| 322 switches::kEnableNaClDebug); | 322 switches::kEnableNaClDebug); |
| 323 DCHECK(process_type_ != kUnknownNaClProcessType); | 323 DCHECK(process_type_ != kUnknownNaClProcessType); |
| 324 enable_crash_throttling_ = process_type_ != kNativeNaClProcessType; | 324 enable_crash_throttling_ = process_type_ != kNativeNaClProcessType; |
| 325 } | 325 } |
| 326 | 326 |
| 327 NaClProcessHost::~NaClProcessHost() { | 327 NaClProcessHost::~NaClProcessHost() { |
| 328 // Report exit status only if the process was successfully started. | 328 // Report exit status only if the process was successfully started. |
| 329 if (process_->GetData().handle != base::kNullProcessHandle) { | 329 if (process_->GetData().handle != base::kNullProcessHandle) { |
| (...skipping 1008 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1338 NaClStartDebugExceptionHandlerThread( | 1338 NaClStartDebugExceptionHandlerThread( |
| 1339 std::move(process), info, base::ThreadTaskRunnerHandle::Get(), | 1339 std::move(process), info, base::ThreadTaskRunnerHandle::Get(), |
| 1340 base::Bind(&NaClProcessHost::OnDebugExceptionHandlerLaunchedByBroker, | 1340 base::Bind(&NaClProcessHost::OnDebugExceptionHandlerLaunchedByBroker, |
| 1341 weak_factory_.GetWeakPtr())); | 1341 weak_factory_.GetWeakPtr())); |
| 1342 return true; | 1342 return true; |
| 1343 } | 1343 } |
| 1344 } | 1344 } |
| 1345 #endif | 1345 #endif |
| 1346 | 1346 |
| 1347 } // namespace nacl | 1347 } // namespace nacl |
| OLD | NEW |