| 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 <algorithm> | 7 #include <algorithm> |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 323 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 334 CommandLine* cmd = CommandLine::ForCurrentProcess(); | 334 CommandLine* cmd = CommandLine::ForCurrentProcess(); |
| 335 UMA_HISTOGRAM_BOOLEAN( | 335 UMA_HISTOGRAM_BOOLEAN( |
| 336 "NaCl.nacl-gdb", | 336 "NaCl.nacl-gdb", |
| 337 !cmd->GetSwitchValuePath(switches::kNaClGdb).empty()); | 337 !cmd->GetSwitchValuePath(switches::kNaClGdb).empty()); |
| 338 UMA_HISTOGRAM_BOOLEAN( | 338 UMA_HISTOGRAM_BOOLEAN( |
| 339 "NaCl.nacl-gdb-script", | 339 "NaCl.nacl-gdb-script", |
| 340 !cmd->GetSwitchValuePath(switches::kNaClGdbScript).empty()); | 340 !cmd->GetSwitchValuePath(switches::kNaClGdbScript).empty()); |
| 341 UMA_HISTOGRAM_BOOLEAN( | 341 UMA_HISTOGRAM_BOOLEAN( |
| 342 "NaCl.enable-nacl-debug", | 342 "NaCl.enable-nacl-debug", |
| 343 cmd->HasSwitch(switches::kEnableNaClDebug)); | 343 cmd->HasSwitch(switches::kEnableNaClDebug)); |
| 344 NaClBrowser::GetDelegate()->SetDebugPatterns( | 344 std::string nacl_debug_mask = |
| 345 cmd->GetSwitchValueASCII(switches::kNaClDebugMask)); | 345 cmd->GetSwitchValueASCII(switches::kNaClDebugMask); |
| 346 // By default, exclude debugging SSH and the PNaCl translator. |
| 347 // about::flags only allows empty flags as the default, so replace |
| 348 // the empty setting with the default. To debug all apps, use a wild-card. |
| 349 if (nacl_debug_mask.empty()) { |
| 350 nacl_debug_mask = "!*://*/*ssh_client.nmf,chrome://pnacl-translator/*"; |
| 351 } |
| 352 NaClBrowser::GetDelegate()->SetDebugPatterns(nacl_debug_mask); |
| 346 } | 353 } |
| 347 | 354 |
| 348 void NaClProcessHost::Launch( | 355 void NaClProcessHost::Launch( |
| 349 NaClHostMessageFilter* nacl_host_message_filter, | 356 NaClHostMessageFilter* nacl_host_message_filter, |
| 350 IPC::Message* reply_msg, | 357 IPC::Message* reply_msg, |
| 351 const base::FilePath& manifest_path) { | 358 const base::FilePath& manifest_path) { |
| 352 nacl_host_message_filter_ = nacl_host_message_filter; | 359 nacl_host_message_filter_ = nacl_host_message_filter; |
| 353 reply_msg_ = reply_msg; | 360 reply_msg_ = reply_msg; |
| 354 manifest_path_ = manifest_path; | 361 manifest_path_ = manifest_path; |
| 355 | 362 |
| (...skipping 690 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1046 process_handle.Take(), info, | 1053 process_handle.Take(), info, |
| 1047 base::MessageLoopProxy::current(), | 1054 base::MessageLoopProxy::current(), |
| 1048 base::Bind(&NaClProcessHost::OnDebugExceptionHandlerLaunchedByBroker, | 1055 base::Bind(&NaClProcessHost::OnDebugExceptionHandlerLaunchedByBroker, |
| 1049 weak_factory_.GetWeakPtr())); | 1056 weak_factory_.GetWeakPtr())); |
| 1050 return true; | 1057 return true; |
| 1051 } | 1058 } |
| 1052 } | 1059 } |
| 1053 #endif | 1060 #endif |
| 1054 | 1061 |
| 1055 } // namespace nacl | 1062 } // namespace nacl |
| OLD | NEW |