| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/file_util.h" | 8 #include "base/file_util.h" |
| 9 #include "base/string_number_conversions.h" | 9 #include "base/string_number_conversions.h" |
| 10 #include "base/string_split.h" | 10 #include "base/string_split.h" |
| (...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 154 if (!in_process_renderer_) | 154 if (!in_process_renderer_) |
| 155 AssertAppNotRunning( | 155 AssertAppNotRunning( |
| 156 StringPrintf(L"Unable to quit all browser processes. Original PID %d", | 156 StringPrintf(L"Unable to quit all browser processes. Original PID %d", |
| 157 &process_id_)); | 157 &process_id_)); |
| 158 | 158 |
| 159 automation_proxy_.reset(); // Shut down IPC testing interface. | 159 automation_proxy_.reset(); // Shut down IPC testing interface. |
| 160 } | 160 } |
| 161 | 161 |
| 162 void ProxyLauncher::LaunchBrowser(const LaunchState& state) { | 162 void ProxyLauncher::LaunchBrowser(const LaunchState& state) { |
| 163 if (state.clear_profile || !temp_profile_dir_.IsValid()) { | 163 if (state.clear_profile || !temp_profile_dir_.IsValid()) { |
| 164 temp_profile_dir_.Delete(); | 164 if (temp_profile_dir_.IsValid()) |
| 165 ASSERT_TRUE(temp_profile_dir_.Delete()); |
| 165 ASSERT_TRUE(temp_profile_dir_.CreateUniqueTempDir()); | 166 ASSERT_TRUE(temp_profile_dir_.CreateUniqueTempDir()); |
| 166 | 167 |
| 167 ASSERT_TRUE(test_launcher_utils::OverrideUserDataDir(user_data_dir())); | 168 ASSERT_TRUE(test_launcher_utils::OverrideUserDataDir(user_data_dir())); |
| 168 } | 169 } |
| 169 | 170 |
| 170 if (!state.template_user_data.empty()) { | 171 if (!state.template_user_data.empty()) { |
| 171 // Recursively copy the template directory to the user_data_dir. | 172 // Recursively copy the template directory to the user_data_dir. |
| 172 ASSERT_TRUE(file_util::CopyRecursiveDirNoCache( | 173 ASSERT_TRUE(file_util::CopyRecursiveDirNoCache( |
| 173 state.template_user_data, | 174 state.template_user_data, |
| 174 user_data_dir())); | 175 user_data_dir())); |
| (...skipping 360 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 535 } | 536 } |
| 536 | 537 |
| 537 void AnonymousProxyLauncher::InitializeConnection(const LaunchState& state, | 538 void AnonymousProxyLauncher::InitializeConnection(const LaunchState& state, |
| 538 bool wait_for_initial_loads) { | 539 bool wait_for_initial_loads) { |
| 539 LaunchBrowserAndServer(state, wait_for_initial_loads); | 540 LaunchBrowserAndServer(state, wait_for_initial_loads); |
| 540 } | 541 } |
| 541 | 542 |
| 542 std::string AnonymousProxyLauncher::PrefixedChannelID() const { | 543 std::string AnonymousProxyLauncher::PrefixedChannelID() const { |
| 543 return channel_id_; | 544 return channel_id_; |
| 544 } | 545 } |
| OLD | NEW |