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

Side by Side Diff: chrome/test/live_sync/live_sync_test.cc

Issue 2838042: Incorporating feedback from C++ readability review. (Closed)
Patch Set: Removing fwd declaration comments per Chromium norms. Also alphabetizing declarations. Created 10 years, 5 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
« no previous file with comments | « chrome/test/live_sync/live_sync_test.h ('k') | no next file » | 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/live_sync/live_sync_test.h" 5 #include "chrome/test/live_sync/live_sync_test.h"
6 6
7 #include "chrome/browser/profile.h" 7 #include "chrome/browser/profile.h"
8 #include "chrome/browser/profile_manager.h" 8 #include "chrome/browser/profile_manager.h"
9 #include "chrome/common/chrome_paths.h" 9 #include "chrome/common/chrome_paths.h"
10 #include "chrome/common/chrome_switches.h" 10 #include "chrome/common/chrome_switches.h"
(...skipping 30 matching lines...) Expand all
41 void LiveSyncTest::TearDown() { 41 void LiveSyncTest::TearDown() {
42 // Allow the InProcessBrowserTest framework to perform its tear down. 42 // Allow the InProcessBrowserTest framework to perform its tear down.
43 InProcessBrowserTest::TearDown(); 43 InProcessBrowserTest::TearDown();
44 44
45 // Stop the local test sync server if one was used. 45 // Stop the local test sync server if one was used.
46 if (started_local_test_server_) 46 if (started_local_test_server_)
47 TearDownLocalTestServer(); 47 TearDownLocalTestServer();
48 } 48 }
49 49
50 // static 50 // static
51 Profile* LiveSyncTest::MakeProfile( 51 Profile* LiveSyncTest::MakeProfile(const FilePath::StringType name) {
52 const FilePath::StringType name) {
53 FilePath path; 52 FilePath path;
54 PathService::Get(chrome::DIR_USER_DATA, &path); 53 PathService::Get(chrome::DIR_USER_DATA, &path);
55 return ProfileManager::CreateProfile(path.Append(name)); 54 return ProfileManager::CreateProfile(path.Append(name));
56 } 55 }
57 56
58 Profile* LiveSyncTest::GetProfile(int index) { 57 Profile* LiveSyncTest::GetProfile(int index) {
59 EXPECT_FALSE(profiles_.empty()) << "SetupSync() has not yet been called."; 58 EXPECT_FALSE(profiles_.empty()) << "SetupSync() has not yet been called.";
60 EXPECT_TRUE((index >= 0) && (index < static_cast<int>(profiles_.size()))) 59 EXPECT_TRUE((index >= 0) && (index < static_cast<int>(profiles_.size())))
61 << "GetProfile(): Index is out of bounds."; 60 << "GetProfile(): Index is out of bounds.";
62 return profiles_[index]; 61 return profiles_[index];
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
148 CommandLine* cl = CommandLine::ForCurrentProcess(); 147 CommandLine* cl = CommandLine::ForCurrentProcess();
149 cl->AppendSwitchWithValue(switches::kSyncServiceURL, 148 cl->AppendSwitchWithValue(switches::kSyncServiceURL,
150 StringPrintf("http://%s:%d/chromiumsync", server_.kHostName, 149 StringPrintf("http://%s:%d/chromiumsync", server_.kHostName,
151 server_.kOKHTTPSPort)); 150 server_.kOKHTTPSPort));
152 } 151 }
153 152
154 void LiveSyncTest::TearDownLocalTestServer() { 153 void LiveSyncTest::TearDownLocalTestServer() {
155 bool success = server_.Stop(); 154 bool success = server_.Stop();
156 ASSERT_TRUE(success); 155 ASSERT_TRUE(success);
157 } 156 }
OLDNEW
« no previous file with comments | « chrome/test/live_sync/live_sync_test.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698