Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(71)

Side by Side Diff: components/nacl/browser/nacl_process_host.cc

Issue 176813010: Avoid blocking the PNaCl translator processes when chrome NaCl GDB flag is on. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: explain more Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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/*";
bradn 2014/03/06 18:56:34 { } goto fail :-) ?
jvoung (off chromium) 2014/03/06 19:02:51 Done.
351 NaClBrowser::GetDelegate()->SetDebugPatterns(nacl_debug_mask);
346 } 352 }
347 353
348 void NaClProcessHost::Launch( 354 void NaClProcessHost::Launch(
349 NaClHostMessageFilter* nacl_host_message_filter, 355 NaClHostMessageFilter* nacl_host_message_filter,
350 IPC::Message* reply_msg, 356 IPC::Message* reply_msg,
351 const base::FilePath& manifest_path) { 357 const base::FilePath& manifest_path) {
352 nacl_host_message_filter_ = nacl_host_message_filter; 358 nacl_host_message_filter_ = nacl_host_message_filter;
353 reply_msg_ = reply_msg; 359 reply_msg_ = reply_msg;
354 manifest_path_ = manifest_path; 360 manifest_path_ = manifest_path;
355 361
(...skipping 690 matching lines...) Expand 10 before | Expand all | Expand 10 after
1046 process_handle.Take(), info, 1052 process_handle.Take(), info,
1047 base::MessageLoopProxy::current(), 1053 base::MessageLoopProxy::current(),
1048 base::Bind(&NaClProcessHost::OnDebugExceptionHandlerLaunchedByBroker, 1054 base::Bind(&NaClProcessHost::OnDebugExceptionHandlerLaunchedByBroker,
1049 weak_factory_.GetWeakPtr())); 1055 weak_factory_.GetWeakPtr()));
1050 return true; 1056 return true;
1051 } 1057 }
1052 } 1058 }
1053 #endif 1059 #endif
1054 1060
1055 } // namespace nacl 1061 } // namespace nacl
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698