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

Side by Side Diff: chrome/browser/sync/test/integration/single_client_backup_rollback_test.cc

Issue 816403003: Make callers of CommandLine use it via the base:: namespace. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix Created 5 years, 12 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/command_line.h" 5 #include "base/command_line.h"
6 #include "base/files/file_util.h" 6 #include "base/files/file_util.h"
7 #include "base/message_loop/message_loop.h" 7 #include "base/message_loop/message_loop.h"
8 #include "base/prefs/pref_service.h" 8 #include "base/prefs/pref_service.h"
9 #include "base/run_loop.h" 9 #include "base/run_loop.h"
10 #include "base/test/test_timeouts.h" 10 #include "base/test/test_timeouts.h"
(...skipping 23 matching lines...) Expand all
34 const char kUrl2[] = "http://map.google.com"; 34 const char kUrl2[] = "http://map.google.com";
35 const char kUrl3[] = "http://plus.google.com"; 35 const char kUrl3[] = "http://plus.google.com";
36 } // anonymous namespace 36 } // anonymous namespace
37 37
38 class SingleClientBackupRollbackTest : public SyncTest { 38 class SingleClientBackupRollbackTest : public SyncTest {
39 public: 39 public:
40 SingleClientBackupRollbackTest() : SyncTest(SINGLE_CLIENT) {} 40 SingleClientBackupRollbackTest() : SyncTest(SINGLE_CLIENT) {}
41 ~SingleClientBackupRollbackTest() override {} 41 ~SingleClientBackupRollbackTest() override {}
42 42
43 void DisableBackup() { 43 void DisableBackup() {
44 CommandLine::ForCurrentProcess()->AppendSwitch( 44 base::CommandLine::ForCurrentProcess()->AppendSwitch(
45 switches::kSyncDisableBackup); 45 switches::kSyncDisableBackup);
46 } 46 }
47 47
48 void DisableRollback() { 48 void DisableRollback() {
49 CommandLine::ForCurrentProcess()->AppendSwitch( 49 base::CommandLine::ForCurrentProcess()->AppendSwitch(
50 switches::kSyncDisableRollback); 50 switches::kSyncDisableRollback);
51 } 51 }
52 52
53 base::Time GetBackupDbLastModified() { 53 base::Time GetBackupDbLastModified() {
54 base::RunLoop run_loop; 54 base::RunLoop run_loop;
55 55
56 base::Time backup_time; 56 base::Time backup_time;
57 syncer::CheckSyncDbLastModifiedTime( 57 syncer::CheckSyncDbLastModifiedTime(
58 GetProfile(0)->GetPath().Append(FILE_PATH_LITERAL("Sync Data Backup")), 58 GetProfile(0)->GetPath().Append(FILE_PATH_LITERAL("Sync Data Backup")),
59 base::MessageLoopProxy::current(), 59 base::MessageLoopProxy::current(),
60 base::Bind(&SingleClientBackupRollbackTest::CheckDbCallback, 60 base::Bind(&SingleClientBackupRollbackTest::CheckDbCallback,
(...skipping 371 matching lines...) Expand 10 before | Expand all | Expand 10 after
432 ASSERT_TRUE(rollback_checker.Wait()); 432 ASSERT_TRUE(rollback_checker.Wait());
433 SyncBackendStoppedChecker shutdown_checker(GetSyncService(0)); 433 SyncBackendStoppedChecker shutdown_checker(GetSyncService(0));
434 ASSERT_TRUE(shutdown_checker.Wait()); 434 ASSERT_TRUE(shutdown_checker.Wait());
435 435
436 // Verify bookmarks are unchanged. 436 // Verify bookmarks are unchanged.
437 ASSERT_EQ(3, sub_folder->child_count()); 437 ASSERT_EQ(3, sub_folder->child_count());
438 ASSERT_EQ(GURL(kUrl1), sub_folder->GetChild(0)->url()); 438 ASSERT_EQ(GURL(kUrl1), sub_folder->GetChild(0)->url());
439 ASSERT_EQ(GURL(kUrl2), sub_folder->GetChild(1)->url()); 439 ASSERT_EQ(GURL(kUrl2), sub_folder->GetChild(1)->url());
440 ASSERT_EQ(GURL(kUrl3), sub_folder->GetChild(2)->url()); 440 ASSERT_EQ(GURL(kUrl3), sub_folder->GetChild(2)->url());
441 } 441 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698