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 "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 330 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
341 | 341 |
342 base::CloseProcessHandle(process_); | 342 base::CloseProcessHandle(process_); |
343 process_ = base::kNullProcessHandle; | 343 process_ = base::kNullProcessHandle; |
344 process_id_ = -1; | 344 process_id_ = -1; |
345 | 345 |
346 return success; | 346 return success; |
347 } | 347 } |
348 | 348 |
349 void ProxyLauncher::PrepareTestCommandline(CommandLine* command_line, | 349 void ProxyLauncher::PrepareTestCommandline(CommandLine* command_line, |
350 bool include_testing_id) { | 350 bool include_testing_id) { |
351 // Propagate commandline settings from test_launcher_utils. | |
352 test_launcher_utils::PrepareBrowserCommandLineForTests(command_line); | |
353 | |
354 // Add any explicit command line flags passed to the process. | 351 // Add any explicit command line flags passed to the process. |
355 CommandLine::StringType extra_chrome_flags = | 352 CommandLine::StringType extra_chrome_flags = |
356 CommandLine::ForCurrentProcess()->GetSwitchValueNative( | 353 CommandLine::ForCurrentProcess()->GetSwitchValueNative( |
357 switches::kExtraChromeFlags); | 354 switches::kExtraChromeFlags); |
358 if (!extra_chrome_flags.empty()) { | 355 if (!extra_chrome_flags.empty()) { |
359 // Split by spaces and append to command line. | 356 // Split by spaces and append to command line. |
360 std::vector<CommandLine::StringType> flags; | 357 std::vector<CommandLine::StringType> flags; |
361 base::SplitStringAlongWhitespace(extra_chrome_flags, &flags); | 358 base::SplitStringAlongWhitespace(extra_chrome_flags, &flags); |
362 for (size_t i = 0; i < flags.size(); ++i) | 359 for (size_t i = 0; i < flags.size(); ++i) |
363 command_line->AppendArgNative(flags[i]); | 360 command_line->AppendArgNative(flags[i]); |
(...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
598 return LaunchBrowserAndServer(state, wait_for_initial_loads); | 595 return LaunchBrowserAndServer(state, wait_for_initial_loads); |
599 } | 596 } |
600 | 597 |
601 void AnonymousProxyLauncher::TerminateConnection() { | 598 void AnonymousProxyLauncher::TerminateConnection() { |
602 CloseBrowserAndServer(); | 599 CloseBrowserAndServer(); |
603 } | 600 } |
604 | 601 |
605 std::string AnonymousProxyLauncher::PrefixedChannelID() const { | 602 std::string AnonymousProxyLauncher::PrefixedChannelID() const { |
606 return channel_id_; | 603 return channel_id_; |
607 } | 604 } |
OLD | NEW |