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 196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
207 | 207 |
208 if (!LaunchBrowserHelper(state, true, false, &process_)) { | 208 if (!LaunchBrowserHelper(state, true, false, &process_)) { |
209 LOG(ERROR) << "LaunchBrowserHelper failed."; | 209 LOG(ERROR) << "LaunchBrowserHelper failed."; |
210 return false; | 210 return false; |
211 } | 211 } |
212 process_id_ = base::GetProcId(process_); | 212 process_id_ = base::GetProcId(process_); |
213 | 213 |
214 return true; | 214 return true; |
215 } | 215 } |
216 | 216 |
217 #if !defined(OS_MACOSX) | |
218 bool ProxyLauncher::LaunchAnotherBrowserBlockUntilClosed( | |
219 const LaunchState& state) { | |
220 return LaunchBrowserHelper(state, false, true, NULL); | |
221 } | |
222 #endif | |
223 | |
224 void ProxyLauncher::QuitBrowser() { | 217 void ProxyLauncher::QuitBrowser() { |
225 // If we have already finished waiting for the browser to exit | 218 // If we have already finished waiting for the browser to exit |
226 // (or it hasn't launched at all), there's nothing to do here. | 219 // (or it hasn't launched at all), there's nothing to do here. |
227 if (process_ == base::kNullProcessHandle || !automation_proxy_.get()) | 220 if (process_ == base::kNullProcessHandle || !automation_proxy_.get()) |
228 return; | 221 return; |
229 | 222 |
230 if (SESSION_ENDING == shutdown_type_) { | 223 if (SESSION_ENDING == shutdown_type_) { |
231 TerminateBrowser(); | 224 TerminateBrowser(); |
232 return; | 225 return; |
233 } | 226 } |
(...skipping 376 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
610 return LaunchBrowserAndServer(state, wait_for_initial_loads); | 603 return LaunchBrowserAndServer(state, wait_for_initial_loads); |
611 } | 604 } |
612 | 605 |
613 void AnonymousProxyLauncher::TerminateConnection() { | 606 void AnonymousProxyLauncher::TerminateConnection() { |
614 CloseBrowserAndServer(); | 607 CloseBrowserAndServer(); |
615 } | 608 } |
616 | 609 |
617 std::string AnonymousProxyLauncher::PrefixedChannelID() const { | 610 std::string AnonymousProxyLauncher::PrefixedChannelID() const { |
618 return channel_id_; | 611 return channel_id_; |
619 } | 612 } |
OLD | NEW |