| 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 541 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 552 proxy->InitializeChannel(channel_id_, true); | 552 proxy->InitializeChannel(channel_id_, true); |
| 553 return proxy; | 553 return proxy; |
| 554 } | 554 } |
| 555 | 555 |
| 556 bool NamedProxyLauncher::InitializeConnection(const LaunchState& state, | 556 bool NamedProxyLauncher::InitializeConnection(const LaunchState& state, |
| 557 bool wait_for_initial_loads) { | 557 bool wait_for_initial_loads) { |
| 558 if (launch_browser_) { | 558 if (launch_browser_) { |
| 559 #if defined(OS_POSIX) | 559 #if defined(OS_POSIX) |
| 560 // Because we are waiting on the existence of the testing file below, | 560 // Because we are waiting on the existence of the testing file below, |
| 561 // make sure there isn't one already there before browser launch. | 561 // make sure there isn't one already there before browser launch. |
| 562 if (!file_util::Delete(base::FilePath(channel_id_), false)) { | 562 if (!base::Delete(base::FilePath(channel_id_), false)) { |
| 563 LOG(ERROR) << "Failed to delete " << channel_id_; | 563 LOG(ERROR) << "Failed to delete " << channel_id_; |
| 564 return false; | 564 return false; |
| 565 } | 565 } |
| 566 #endif | 566 #endif |
| 567 | 567 |
| 568 if (!LaunchBrowser(state)) { | 568 if (!LaunchBrowser(state)) { |
| 569 LOG(ERROR) << "Failed to LaunchBrowser"; | 569 LOG(ERROR) << "Failed to LaunchBrowser"; |
| 570 return false; | 570 return false; |
| 571 } | 571 } |
| 572 } | 572 } |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 628 return LaunchBrowserAndServer(state, wait_for_initial_loads); | 628 return LaunchBrowserAndServer(state, wait_for_initial_loads); |
| 629 } | 629 } |
| 630 | 630 |
| 631 void AnonymousProxyLauncher::TerminateConnection() { | 631 void AnonymousProxyLauncher::TerminateConnection() { |
| 632 CloseBrowserAndServer(); | 632 CloseBrowserAndServer(); |
| 633 } | 633 } |
| 634 | 634 |
| 635 std::string AnonymousProxyLauncher::PrefixedChannelID() const { | 635 std::string AnonymousProxyLauncher::PrefixedChannelID() const { |
| 636 return channel_id_; | 636 return channel_id_; |
| 637 } | 637 } |
| OLD | NEW |