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

Side by Side Diff: components/sync_driver/backup_rollback_controller_unittest.cc

Issue 1487873003: Convert enable_pre_sync_backup flag to new flags system. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix Created 5 years 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 | « components/sync_driver/backup_rollback_controller.cc ('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 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 "components/sync_driver/backup_rollback_controller.h" 5 #include "components/sync_driver/backup_rollback_controller.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/location.h" 10 #include "base/location.h"
11 #include "base/memory/scoped_ptr.h" 11 #include "base/memory/scoped_ptr.h"
12 #include "base/run_loop.h" 12 #include "base/run_loop.h"
13 #include "base/single_thread_task_runner.h" 13 #include "base/single_thread_task_runner.h"
14 #include "components/sync_driver/signin_manager_wrapper.h" 14 #include "components/sync_driver/signin_manager_wrapper.h"
15 #include "components/sync_driver/sync_driver_features.h"
15 #include "components/sync_driver/sync_driver_switches.h" 16 #include "components/sync_driver/sync_driver_switches.h"
16 #include "components/sync_driver/sync_prefs.h" 17 #include "components/sync_driver/sync_prefs.h"
17 #include "testing/gmock/include/gmock/gmock.h" 18 #include "testing/gmock/include/gmock/gmock.h"
18 #include "testing/gtest/include/gtest/gtest.h" 19 #include "testing/gtest/include/gtest/gtest.h"
19 20
20 using ::testing::Return; 21 using ::testing::Return;
21 22
22 namespace { 23 namespace {
23 24
24 #if defined(ENABLE_PRE_SYNC_BACKUP) 25 #if BUILDFLAG(ENABLE_PRE_SYNC_BACKUP)
25 26
26 class MockSigninManagerWrapper : public SigninManagerWrapper { 27 class MockSigninManagerWrapper : public SigninManagerWrapper {
27 public: 28 public:
28 MockSigninManagerWrapper() : SigninManagerWrapper(NULL) {} 29 MockSigninManagerWrapper() : SigninManagerWrapper(NULL) {}
29 30
30 MOCK_CONST_METHOD0(GetEffectiveUsername, std::string()); 31 MOCK_CONST_METHOD0(GetEffectiveUsername, std::string());
31 }; 32 };
32 33
33 class FakeSyncPrefs : public sync_driver::SyncPrefs { 34 class FakeSyncPrefs : public sync_driver::SyncPrefs {
34 public: 35 public:
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
138 EXPECT_FALSE(controller_->StartRollback()); 139 EXPECT_FALSE(controller_->StartRollback());
139 EXPECT_EQ(0, fake_prefs_.GetRemainingRollbackTries()); 140 EXPECT_EQ(0, fake_prefs_.GetRemainingRollbackTries());
140 141
141 PumpLoop(); 142 PumpLoop();
142 EXPECT_FALSE(rollback_started_); 143 EXPECT_FALSE(rollback_started_);
143 } 144 }
144 145
145 #endif 146 #endif
146 147
147 } // anonymous namespace 148 } // anonymous namespace
OLDNEW
« no previous file with comments | « components/sync_driver/backup_rollback_controller.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698