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

Side by Side Diff: chrome/browser/sync/profile_sync_service_unittest.cc

Issue 483883003: [Sync] Fix backup/rollback tests race conditions (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 4 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
OLDNEW
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 "base/basictypes.h" 5 #include "base/basictypes.h"
6 #include "base/command_line.h" 6 #include "base/command_line.h"
7 #include "base/compiler_specific.h" 7 #include "base/compiler_specific.h"
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "base/run_loop.h" 9 #include "base/run_loop.h"
10 #include "base/strings/string_number_conversions.h" 10 #include "base/strings/string_number_conversions.h"
(...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after
279 } 279 }
280 280
281 ProfileSyncService* service() { 281 ProfileSyncService* service() {
282 return service_.get(); 282 return service_.get();
283 } 283 }
284 284
285 ProfileSyncComponentsFactoryMock* components_factory() { 285 ProfileSyncComponentsFactoryMock* components_factory() {
286 return components_factory_; 286 return components_factory_;
287 } 287 }
288 288
289 void ClearBrowsingDataCallback(Profile* profile, base::Time start, 289 void ClearBrowsingDataCallback(BrowsingDataRemover::Observer* observer,
290 Profile* profile,
291 base::Time start,
290 base::Time end) { 292 base::Time end) {
291 EXPECT_EQ(profile_, profile); 293 EXPECT_EQ(profile_, profile);
292 clear_browsing_date_start_ = start; 294 clear_browsing_date_start_ = start;
293 } 295 }
294 296
295 protected: 297 protected:
296 void PumpLoop() { 298 void PumpLoop() {
297 base::RunLoop run_loop; 299 base::RunLoop run_loop;
298 base::MessageLoop::current()->PostTask( 300 base::MessageLoop::current()->PostTask(
299 FROM_HERE, run_loop.QuitClosure()); 301 FROM_HERE, run_loop.QuitClosure());
(...skipping 307 matching lines...) Expand 10 before | Expand all | Expand 10 after
607 // See that we can override the URL with a flag. 609 // See that we can override the URL with a flag.
608 CommandLine command_line( 610 CommandLine command_line(
609 base::FilePath(base::FilePath(FILE_PATH_LITERAL("chrome.exe")))); 611 base::FilePath(base::FilePath(FILE_PATH_LITERAL("chrome.exe"))));
610 command_line.AppendSwitchASCII(switches::kSyncServiceURL, "https://foo/bar"); 612 command_line.AppendSwitchASCII(switches::kSyncServiceURL, "https://foo/bar");
611 EXPECT_EQ("https://foo/bar", 613 EXPECT_EQ("https://foo/bar",
612 ProfileSyncService::GetSyncServiceURL(command_line).spec()); 614 ProfileSyncService::GetSyncServiceURL(command_line).spec());
613 } 615 }
614 616
615 } // namespace 617 } // namespace
616 } // namespace browser_sync 618 } // namespace browser_sync
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698