| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "app/sql/connection.h" | 7 #include "app/sql/connection.h" |
| 8 #include "base/environment.h" | 8 #include "base/environment.h" |
| 9 #include "base/file_util.h" | 9 #include "base/file_util.h" |
| 10 #include "base/string_number_conversions.h" | 10 #include "base/string_number_conversions.h" |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 95 } // namespace | 95 } // namespace |
| 96 | 96 |
| 97 // ProxyLauncher functions | 97 // ProxyLauncher functions |
| 98 | 98 |
| 99 const char ProxyLauncher::kDefaultInterfacePath[] = | 99 const char ProxyLauncher::kDefaultInterfacePath[] = |
| 100 "/var/tmp/ChromeTestingInterface"; | 100 "/var/tmp/ChromeTestingInterface"; |
| 101 | 101 |
| 102 bool ProxyLauncher::in_process_renderer_ = false; | 102 bool ProxyLauncher::in_process_renderer_ = false; |
| 103 bool ProxyLauncher::no_sandbox_ = false; | 103 bool ProxyLauncher::no_sandbox_ = false; |
| 104 bool ProxyLauncher::full_memory_dump_ = false; | 104 bool ProxyLauncher::full_memory_dump_ = false; |
| 105 bool ProxyLauncher::safe_plugins_ = false; | |
| 106 bool ProxyLauncher::show_error_dialogs_ = true; | 105 bool ProxyLauncher::show_error_dialogs_ = true; |
| 107 bool ProxyLauncher::dump_histograms_on_exit_ = false; | 106 bool ProxyLauncher::dump_histograms_on_exit_ = false; |
| 108 bool ProxyLauncher::enable_dcheck_ = false; | 107 bool ProxyLauncher::enable_dcheck_ = false; |
| 109 bool ProxyLauncher::silent_dump_on_dcheck_ = false; | 108 bool ProxyLauncher::silent_dump_on_dcheck_ = false; |
| 110 bool ProxyLauncher::disable_breakpad_ = false; | 109 bool ProxyLauncher::disable_breakpad_ = false; |
| 111 std::string ProxyLauncher::js_flags_ = ""; | 110 std::string ProxyLauncher::js_flags_ = ""; |
| 112 std::string ProxyLauncher::log_level_ = ""; | 111 std::string ProxyLauncher::log_level_ = ""; |
| 113 | 112 |
| 114 ProxyLauncher::ProxyLauncher() | 113 ProxyLauncher::ProxyLauncher() |
| 115 : process_(base::kNullProcessHandle), | 114 : process_(base::kNullProcessHandle), |
| (...skipping 303 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 419 !CommandLine::ForCurrentProcess()->HasSwitch( | 418 !CommandLine::ForCurrentProcess()->HasSwitch( |
| 420 switches::kEnableErrorDialogs)) { | 419 switches::kEnableErrorDialogs)) { |
| 421 command_line->AppendSwitch(switches::kNoErrorDialogs); | 420 command_line->AppendSwitch(switches::kNoErrorDialogs); |
| 422 } | 421 } |
| 423 if (in_process_renderer_) | 422 if (in_process_renderer_) |
| 424 command_line->AppendSwitch(switches::kSingleProcess); | 423 command_line->AppendSwitch(switches::kSingleProcess); |
| 425 if (no_sandbox_) | 424 if (no_sandbox_) |
| 426 command_line->AppendSwitch(switches::kNoSandbox); | 425 command_line->AppendSwitch(switches::kNoSandbox); |
| 427 if (full_memory_dump_) | 426 if (full_memory_dump_) |
| 428 command_line->AppendSwitch(switches::kFullMemoryCrashReport); | 427 command_line->AppendSwitch(switches::kFullMemoryCrashReport); |
| 429 if (safe_plugins_) | |
| 430 command_line->AppendSwitch(switches::kSafePlugins); | |
| 431 if (enable_dcheck_) | 428 if (enable_dcheck_) |
| 432 command_line->AppendSwitch(switches::kEnableDCHECK); | 429 command_line->AppendSwitch(switches::kEnableDCHECK); |
| 433 if (silent_dump_on_dcheck_) | 430 if (silent_dump_on_dcheck_) |
| 434 command_line->AppendSwitch(switches::kSilentDumpOnDCHECK); | 431 command_line->AppendSwitch(switches::kSilentDumpOnDCHECK); |
| 435 if (disable_breakpad_) | 432 if (disable_breakpad_) |
| 436 command_line->AppendSwitch(switches::kDisableBreakpad); | 433 command_line->AppendSwitch(switches::kDisableBreakpad); |
| 437 | 434 |
| 438 if (!js_flags_.empty()) | 435 if (!js_flags_.empty()) |
| 439 command_line->AppendSwitchASCII(switches::kJavaScriptFlags, js_flags_); | 436 command_line->AppendSwitchASCII(switches::kJavaScriptFlags, js_flags_); |
| 440 if (!log_level_.empty()) | 437 if (!log_level_.empty()) |
| (...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 613 ASSERT_TRUE(LaunchBrowserAndServer(state, wait_for_initial_loads)); | 610 ASSERT_TRUE(LaunchBrowserAndServer(state, wait_for_initial_loads)); |
| 614 } | 611 } |
| 615 | 612 |
| 616 void AnonymousProxyLauncher::TerminateConnection() { | 613 void AnonymousProxyLauncher::TerminateConnection() { |
| 617 CloseBrowserAndServer(); | 614 CloseBrowserAndServer(); |
| 618 } | 615 } |
| 619 | 616 |
| 620 std::string AnonymousProxyLauncher::PrefixedChannelID() const { | 617 std::string AnonymousProxyLauncher::PrefixedChannelID() const { |
| 621 return channel_id_; | 618 return channel_id_; |
| 622 } | 619 } |
| OLD | NEW |