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

Side by Side Diff: components/sync/core_impl/test/fake_sync_manager.cc

Issue 2388673002: Revert of [Sync] Move //components/sync to the syncer namespace. (patchset #5 id:40001 of https://co (Closed)
Patch Set: Created 4 years, 2 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 (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 "components/sync/core/test/fake_sync_manager.h" 5 #include "components/sync/core/test/fake_sync_manager.h"
6 6
7 #include <cstddef> 7 #include <cstddef>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/bind_helpers.h" 10 #include "base/bind_helpers.h"
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after
192 192
193 void FakeSyncManager::ShutdownOnSyncThread(ShutdownReason reason) { 193 void FakeSyncManager::ShutdownOnSyncThread(ShutdownReason reason) {
194 DCHECK(sync_task_runner_->RunsTasksOnCurrentThread()); 194 DCHECK(sync_task_runner_->RunsTasksOnCurrentThread());
195 test_user_share_.TearDown(); 195 test_user_share_.TearDown();
196 } 196 }
197 197
198 UserShare* FakeSyncManager::GetUserShare() { 198 UserShare* FakeSyncManager::GetUserShare() {
199 return test_user_share_.user_share(); 199 return test_user_share_.user_share();
200 } 200 }
201 201
202 std::unique_ptr<ModelTypeConnector> 202 std::unique_ptr<syncer_v2::ModelTypeConnector>
203 FakeSyncManager::GetModelTypeConnectorProxy() { 203 FakeSyncManager::GetModelTypeConnectorProxy() {
204 return base::MakeUnique<FakeModelTypeConnector>(); 204 return base::MakeUnique<syncer_v2::FakeModelTypeConnector>();
205 } 205 }
206 206
207 const std::string FakeSyncManager::cache_guid() { 207 const std::string FakeSyncManager::cache_guid() {
208 return test_user_share_.user_share()->directory->cache_guid(); 208 return test_user_share_.user_share()->directory->cache_guid();
209 } 209 }
210 210
211 bool FakeSyncManager::ReceivedExperiment(Experiments* experiments) { 211 bool FakeSyncManager::ReceivedExperiment(Experiments* experiments) {
212 return false; 212 return false;
213 } 213 }
214 214
215 bool FakeSyncManager::HasUnsyncedItems() { 215 bool FakeSyncManager::HasUnsyncedItems() {
216 NOTIMPLEMENTED(); 216 NOTIMPLEMENTED();
217 return false; 217 return false;
218 } 218 }
219 219
220 SyncEncryptionHandler* FakeSyncManager::GetEncryptionHandler() { 220 SyncEncryptionHandler* FakeSyncManager::GetEncryptionHandler() {
221 return fake_encryption_handler_.get(); 221 return fake_encryption_handler_.get();
222 } 222 }
223 223
224 std::vector<std::unique_ptr<ProtocolEvent>> 224 std::vector<std::unique_ptr<ProtocolEvent>>
225 FakeSyncManager::GetBufferedProtocolEvents() { 225 FakeSyncManager::GetBufferedProtocolEvents() {
226 return std::vector<std::unique_ptr<ProtocolEvent>>(); 226 return std::vector<std::unique_ptr<ProtocolEvent>>();
227 } 227 }
228 228
229 void FakeSyncManager::RefreshTypes(ModelTypeSet types) { 229 void FakeSyncManager::RefreshTypes(ModelTypeSet types) {
230 last_refresh_request_types_ = types; 230 last_refresh_request_types_ = types;
231 } 231 }
232 232
233 void FakeSyncManager::RegisterDirectoryTypeDebugInfoObserver( 233 void FakeSyncManager::RegisterDirectoryTypeDebugInfoObserver(
234 TypeDebugInfoObserver* observer) {} 234 syncer::TypeDebugInfoObserver* observer) {}
235 235
236 void FakeSyncManager::UnregisterDirectoryTypeDebugInfoObserver( 236 void FakeSyncManager::UnregisterDirectoryTypeDebugInfoObserver(
237 TypeDebugInfoObserver* observer) {} 237 syncer::TypeDebugInfoObserver* observer) {}
238 238
239 bool FakeSyncManager::HasDirectoryTypeDebugInfoObserver( 239 bool FakeSyncManager::HasDirectoryTypeDebugInfoObserver(
240 TypeDebugInfoObserver* observer) { 240 syncer::TypeDebugInfoObserver* observer) {
241 return false; 241 return false;
242 } 242 }
243 243
244 void FakeSyncManager::RequestEmitDebugInfo() {} 244 void FakeSyncManager::RequestEmitDebugInfo() {}
245 245
246 void FakeSyncManager::OnIncomingInvalidation( 246 void FakeSyncManager::OnIncomingInvalidation(
247 ModelType type, 247 syncer::ModelType type,
248 std::unique_ptr<InvalidationInterface> invalidation) { 248 std::unique_ptr<InvalidationInterface> invalidation) {
249 num_invalidations_received_++; 249 num_invalidations_received_++;
250 } 250 }
251 251
252 ModelTypeSet FakeSyncManager::GetLastRefreshRequestTypes() { 252 ModelTypeSet FakeSyncManager::GetLastRefreshRequestTypes() {
253 return last_refresh_request_types_; 253 return last_refresh_request_types_;
254 } 254 }
255 255
256 void FakeSyncManager::SetInvalidatorEnabled(bool invalidator_enabled) { 256 void FakeSyncManager::SetInvalidatorEnabled(bool invalidator_enabled) {
257 // Do nothing. 257 // Do nothing.
258 } 258 }
259 259
260 void FakeSyncManager::ClearServerData(const ClearServerDataCallback& callback) { 260 void FakeSyncManager::ClearServerData(const ClearServerDataCallback& callback) {
261 callback.Run(); 261 callback.Run();
262 } 262 }
263 263
264 void FakeSyncManager::OnCookieJarChanged(bool account_mismatch, 264 void FakeSyncManager::OnCookieJarChanged(bool account_mismatch,
265 bool empty_jar) {} 265 bool empty_jar) {}
266 266
267 } // namespace syncer 267 } // namespace syncer
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698