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

Side by Side Diff: chrome/test/automation/proxy_launcher.cc

Issue 189603007: Let DCHECK in non-official-release build be opt-in with dcheck_always_on=1 only (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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 "chrome/test/automation/proxy_launcher.h" 5 #include "chrome/test/automation/proxy_launcher.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/environment.h" 9 #include "base/environment.h"
10 #include "base/file_util.h" 10 #include "base/file_util.h"
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 ProxyLauncher::ProxyLauncher() 115 ProxyLauncher::ProxyLauncher()
116 : process_(base::kNullProcessHandle), 116 : process_(base::kNullProcessHandle),
117 process_id_(-1), 117 process_id_(-1),
118 shutdown_type_(WINDOW_CLOSE), 118 shutdown_type_(WINDOW_CLOSE),
119 no_sandbox_(CommandLine::ForCurrentProcess()->HasSwitch( 119 no_sandbox_(CommandLine::ForCurrentProcess()->HasSwitch(
120 switches::kNoSandbox)), 120 switches::kNoSandbox)),
121 full_memory_dump_(CommandLine::ForCurrentProcess()->HasSwitch( 121 full_memory_dump_(CommandLine::ForCurrentProcess()->HasSwitch(
122 switches::kFullMemoryCrashReport)), 122 switches::kFullMemoryCrashReport)),
123 show_error_dialogs_(CommandLine::ForCurrentProcess()->HasSwitch( 123 show_error_dialogs_(CommandLine::ForCurrentProcess()->HasSwitch(
124 switches::kEnableErrorDialogs)), 124 switches::kEnableErrorDialogs)),
125 enable_dcheck_(CommandLine::ForCurrentProcess()->HasSwitch(
126 switches::kEnableDCHECK)),
127 silent_dump_on_dcheck_(CommandLine::ForCurrentProcess()->HasSwitch( 125 silent_dump_on_dcheck_(CommandLine::ForCurrentProcess()->HasSwitch(
128 switches::kSilentDumpOnDCHECK)), 126 switches::kSilentDumpOnDCHECK)),
129 disable_breakpad_(CommandLine::ForCurrentProcess()->HasSwitch( 127 disable_breakpad_(CommandLine::ForCurrentProcess()->HasSwitch(
130 switches::kDisableBreakpad)), 128 switches::kDisableBreakpad)),
131 js_flags_(CommandLine::ForCurrentProcess()->GetSwitchValueASCII( 129 js_flags_(CommandLine::ForCurrentProcess()->GetSwitchValueASCII(
132 switches::kJavaScriptFlags)), 130 switches::kJavaScriptFlags)),
133 log_level_(CommandLine::ForCurrentProcess()->GetSwitchValueASCII( 131 log_level_(CommandLine::ForCurrentProcess()->GetSwitchValueASCII(
134 switches::kLoggingLevel)) { 132 switches::kLoggingLevel)) {
135 } 133 }
136 134
(...skipping 284 matching lines...) Expand 10 before | Expand all | Expand 10 after
421 if (include_testing_id) 419 if (include_testing_id)
422 command_line->AppendSwitchASCII(switches::kTestingChannelID, 420 command_line->AppendSwitchASCII(switches::kTestingChannelID,
423 PrefixedChannelID()); 421 PrefixedChannelID());
424 422
425 if (!show_error_dialogs_) 423 if (!show_error_dialogs_)
426 command_line->AppendSwitch(switches::kNoErrorDialogs); 424 command_line->AppendSwitch(switches::kNoErrorDialogs);
427 if (no_sandbox_) 425 if (no_sandbox_)
428 command_line->AppendSwitch(switches::kNoSandbox); 426 command_line->AppendSwitch(switches::kNoSandbox);
429 if (full_memory_dump_) 427 if (full_memory_dump_)
430 command_line->AppendSwitch(switches::kFullMemoryCrashReport); 428 command_line->AppendSwitch(switches::kFullMemoryCrashReport);
431 if (enable_dcheck_)
432 command_line->AppendSwitch(switches::kEnableDCHECK);
433 if (silent_dump_on_dcheck_) 429 if (silent_dump_on_dcheck_)
434 command_line->AppendSwitch(switches::kSilentDumpOnDCHECK); 430 command_line->AppendSwitch(switches::kSilentDumpOnDCHECK);
435 if (disable_breakpad_) 431 if (disable_breakpad_)
436 command_line->AppendSwitch(switches::kDisableBreakpad); 432 command_line->AppendSwitch(switches::kDisableBreakpad);
437 433
438 if (!js_flags_.empty()) 434 if (!js_flags_.empty())
439 command_line->AppendSwitchASCII(switches::kJavaScriptFlags, js_flags_); 435 command_line->AppendSwitchASCII(switches::kJavaScriptFlags, js_flags_);
440 if (!log_level_.empty()) 436 if (!log_level_.empty())
441 command_line->AppendSwitchASCII(switches::kLoggingLevel, log_level_); 437 command_line->AppendSwitchASCII(switches::kLoggingLevel, log_level_);
442 438
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after
626 return LaunchBrowserAndServer(state, wait_for_initial_loads); 622 return LaunchBrowserAndServer(state, wait_for_initial_loads);
627 } 623 }
628 624
629 void AnonymousProxyLauncher::TerminateConnection() { 625 void AnonymousProxyLauncher::TerminateConnection() {
630 CloseBrowserAndServer(); 626 CloseBrowserAndServer();
631 } 627 }
632 628
633 std::string AnonymousProxyLauncher::PrefixedChannelID() const { 629 std::string AnonymousProxyLauncher::PrefixedChannelID() const {
634 return channel_id_; 630 return channel_id_;
635 } 631 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698