Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(149)

Side by Side Diff: chrome/test/automation/proxy_launcher.cc

Issue 6042009: Added WARN_UNUSED_RESULT to ScopedTempDir methods. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: merge with trunk Created 9 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/test/automation/automation_proxy_uitest.cc ('k') | chrome/test/ui_test_utils.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « chrome/test/automation/automation_proxy_uitest.cc ('k') | chrome/test/ui_test_utils.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698