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

Side by Side Diff: components/sync/driver/fake_sync_service.cc

Issue 2203673002: [Sync] Move //components/sync_driver to //components/sync/driver. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@sd-a
Patch Set: Full change rebased on static lib. Created 4 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
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/fake_sync_service.h" 5 #include "components/sync/driver/fake_sync_service.h"
6 6
7 #include "base/memory/ptr_util.h" 7 #include "base/memory/ptr_util.h"
8 #include "base/values.h" 8 #include "base/values.h"
9 #include "components/sync/core/base_transaction.h" 9 #include "components/sync/core/base_transaction.h"
10 #include "components/sync/core/user_share.h" 10 #include "components/sync/core/user_share.h"
11 #include "components/sync/sessions/sync_session_snapshot.h" 11 #include "components/sync/sessions/sync_session_snapshot.h"
12 12
13 namespace sync_driver { 13 namespace sync_driver {
14 14
15 FakeSyncService::FakeSyncService() 15 FakeSyncService::FakeSyncService()
16 : error_(GoogleServiceAuthError::NONE), 16 : error_(GoogleServiceAuthError::NONE),
17 user_share_(base::WrapUnique(new syncer::UserShare())) {} 17 user_share_(base::WrapUnique(new syncer::UserShare())) {}
18 18
19 FakeSyncService::~FakeSyncService() { 19 FakeSyncService::~FakeSyncService() {}
20 }
21 20
22 bool FakeSyncService::IsFirstSetupComplete() const { 21 bool FakeSyncService::IsFirstSetupComplete() const {
23 return false; 22 return false;
24 } 23 }
25 24
26 bool FakeSyncService::IsSyncAllowed() const { 25 bool FakeSyncService::IsSyncAllowed() const {
27 return false; 26 return false;
28 } 27 }
29 28
30 bool FakeSyncService::IsSyncActive() const { 29 bool FakeSyncService::IsSyncActive() const {
31 return false; 30 return false;
32 } 31 }
33 32
34 void FakeSyncService::TriggerRefresh(const syncer::ModelTypeSet& types) {} 33 void FakeSyncService::TriggerRefresh(const syncer::ModelTypeSet& types) {}
35 34
36 syncer::ModelTypeSet FakeSyncService::GetActiveDataTypes() const { 35 syncer::ModelTypeSet FakeSyncService::GetActiveDataTypes() const {
37 return syncer::ModelTypeSet(); 36 return syncer::ModelTypeSet();
38 } 37 }
39 38
40 SyncClient* FakeSyncService::GetSyncClient() const { 39 SyncClient* FakeSyncService::GetSyncClient() const {
41 return nullptr; 40 return nullptr;
42 } 41 }
43 42
44 void FakeSyncService::AddObserver(SyncServiceObserver* observer) { 43 void FakeSyncService::AddObserver(SyncServiceObserver* observer) {}
45 }
46 44
47 void FakeSyncService::RemoveObserver(SyncServiceObserver* observer) { 45 void FakeSyncService::RemoveObserver(SyncServiceObserver* observer) {}
48 }
49 46
50 bool FakeSyncService::HasObserver(const SyncServiceObserver* observer) const { 47 bool FakeSyncService::HasObserver(const SyncServiceObserver* observer) const {
51 return false; 48 return false;
52 } 49 }
53 50
54 bool FakeSyncService::CanSyncStart() const { 51 bool FakeSyncService::CanSyncStart() const {
55 return false; 52 return false;
56 } 53 }
57 54
58 void FakeSyncService::OnDataTypeRequestsSyncStartup(syncer::ModelType type) { 55 void FakeSyncService::OnDataTypeRequestsSyncStartup(syncer::ModelType type) {}
59 }
60 56
61 void FakeSyncService::RequestStop( 57 void FakeSyncService::RequestStop(
62 sync_driver::SyncService::SyncStopDataFate data_fate) { 58 sync_driver::SyncService::SyncStopDataFate data_fate) {}
63 }
64 59
65 void FakeSyncService::RequestStart() { 60 void FakeSyncService::RequestStart() {}
66 }
67 61
68 syncer::ModelTypeSet FakeSyncService::GetPreferredDataTypes() const { 62 syncer::ModelTypeSet FakeSyncService::GetPreferredDataTypes() const {
69 return syncer::ModelTypeSet(); 63 return syncer::ModelTypeSet();
70 } 64 }
71 65
72 void FakeSyncService::OnUserChoseDatatypes(bool sync_everything, 66 void FakeSyncService::OnUserChoseDatatypes(bool sync_everything,
73 syncer::ModelTypeSet chosen_types) { 67 syncer::ModelTypeSet chosen_types) {}
74 }
75 68
76 void FakeSyncService::SetFirstSetupComplete() {} 69 void FakeSyncService::SetFirstSetupComplete() {}
77 70
78 bool FakeSyncService::IsFirstSetupInProgress() const { 71 bool FakeSyncService::IsFirstSetupInProgress() const {
79 return false; 72 return false;
80 } 73 }
81 74
82 std::unique_ptr<SyncSetupInProgressHandle> 75 std::unique_ptr<SyncSetupInProgressHandle>
83 FakeSyncService::GetSetupInProgressHandle() { 76 FakeSyncService::GetSetupInProgressHandle() {
84 return nullptr; 77 return nullptr;
(...skipping 28 matching lines...) Expand all
113 } 106 }
114 107
115 base::Time FakeSyncService::GetExplicitPassphraseTime() const { 108 base::Time FakeSyncService::GetExplicitPassphraseTime() const {
116 return base::Time(); 109 return base::Time();
117 } 110 }
118 111
119 bool FakeSyncService::IsUsingSecondaryPassphrase() const { 112 bool FakeSyncService::IsUsingSecondaryPassphrase() const {
120 return false; 113 return false;
121 } 114 }
122 115
123 void FakeSyncService::EnableEncryptEverything() { 116 void FakeSyncService::EnableEncryptEverything() {}
124 }
125 117
126 bool FakeSyncService::IsEncryptEverythingEnabled() const { 118 bool FakeSyncService::IsEncryptEverythingEnabled() const {
127 return false; 119 return false;
128 } 120 }
129 121
130 void FakeSyncService::SetEncryptionPassphrase(const std::string& passphrase, 122 void FakeSyncService::SetEncryptionPassphrase(const std::string& passphrase,
131 PassphraseType type) { 123 PassphraseType type) {}
132 }
133 124
134 bool FakeSyncService::SetDecryptionPassphrase(const std::string& passphrase) { 125 bool FakeSyncService::SetDecryptionPassphrase(const std::string& passphrase) {
135 return false; 126 return false;
136 } 127 }
137 128
138 bool FakeSyncService::IsCryptographerReady( 129 bool FakeSyncService::IsCryptographerReady(
139 const syncer::BaseTransaction* trans) const { 130 const syncer::BaseTransaction* trans) const {
140 return false; 131 return false;
141 } 132 }
142 133
143 syncer::UserShare* FakeSyncService::GetUserShare() const { 134 syncer::UserShare* FakeSyncService::GetUserShare() const {
144 return user_share_.get(); 135 return user_share_.get();
145 } 136 }
146 137
147 LocalDeviceInfoProvider* FakeSyncService::GetLocalDeviceInfoProvider() const { 138 LocalDeviceInfoProvider* FakeSyncService::GetLocalDeviceInfoProvider() const {
148 return nullptr; 139 return nullptr;
149 } 140 }
150 141
151 void FakeSyncService::RegisterDataTypeController( 142 void FakeSyncService::RegisterDataTypeController(
152 sync_driver::DataTypeController* data_type_controller) { 143 sync_driver::DataTypeController* data_type_controller) {}
153 }
154 144
155 void FakeSyncService::ReenableDatatype(syncer::ModelType type) {} 145 void FakeSyncService::ReenableDatatype(syncer::ModelType type) {}
156 146
157 bool FakeSyncService::IsPassphraseRequired() const { 147 bool FakeSyncService::IsPassphraseRequired() const {
158 return false; 148 return false;
159 } 149 }
160 150
161 syncer::ModelTypeSet FakeSyncService::GetEncryptedDataTypes() const { 151 syncer::ModelTypeSet FakeSyncService::GetEncryptedDataTypes() const {
162 return syncer::ModelTypeSet(); 152 return syncer::ModelTypeSet();
163 } 153 }
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
217 syncer::TypeDebugInfoObserver* observer) {} 207 syncer::TypeDebugInfoObserver* observer) {}
218 208
219 base::WeakPtr<syncer::JsController> FakeSyncService::GetJsController() { 209 base::WeakPtr<syncer::JsController> FakeSyncService::GetJsController() {
220 return base::WeakPtr<syncer::JsController>(); 210 return base::WeakPtr<syncer::JsController>();
221 } 211 }
222 212
223 void FakeSyncService::GetAllNodes( 213 void FakeSyncService::GetAllNodes(
224 const base::Callback<void(std::unique_ptr<base::ListValue>)>& callback) {} 214 const base::Callback<void(std::unique_ptr<base::ListValue>)>& callback) {}
225 215
226 } // namespace sync_driver 216 } // namespace sync_driver
OLDNEW
« no previous file with comments | « components/sync/driver/fake_sync_service.h ('k') | components/sync/driver/frontend_data_type_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698