| OLD | NEW |
| 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 "sync/internal_api/public/test/fake_sync_manager.h" | 5 #include "sync/internal_api/public/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 253 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 264 | 264 |
| 265 bool FakeSyncManager::HasUnsyncedItems() { | 265 bool FakeSyncManager::HasUnsyncedItems() { |
| 266 NOTIMPLEMENTED(); | 266 NOTIMPLEMENTED(); |
| 267 return false; | 267 return false; |
| 268 } | 268 } |
| 269 | 269 |
| 270 SyncEncryptionHandler* FakeSyncManager::GetEncryptionHandler() { | 270 SyncEncryptionHandler* FakeSyncManager::GetEncryptionHandler() { |
| 271 return fake_encryption_handler_.get(); | 271 return fake_encryption_handler_.get(); |
| 272 } | 272 } |
| 273 | 273 |
| 274 void FakeSyncManager::RefreshTypes(ModelTypeSet types) { |
| 275 last_refresh_request_types_ = types; |
| 276 } |
| 277 |
| 274 void FakeSyncManager::InvalidateOnSyncThread( | 278 void FakeSyncManager::InvalidateOnSyncThread( |
| 275 const ObjectIdInvalidationMap& invalidation_map, | 279 const ObjectIdInvalidationMap& invalidation_map, |
| 276 IncomingInvalidationSource source) { | 280 IncomingInvalidationSource source) { |
| 277 DCHECK(sync_task_runner_->RunsTasksOnCurrentThread()); | 281 DCHECK(sync_task_runner_->RunsTasksOnCurrentThread()); |
| 278 registrar_.DispatchInvalidationsToHandlers(invalidation_map, source); | 282 registrar_.DispatchInvalidationsToHandlers(invalidation_map, source); |
| 279 } | 283 } |
| 280 | 284 |
| 281 void FakeSyncManager::UpdateInvalidatorStateOnSyncThread( | 285 void FakeSyncManager::UpdateInvalidatorStateOnSyncThread( |
| 282 InvalidatorState state) { | 286 InvalidatorState state) { |
| 283 DCHECK(sync_task_runner_->RunsTasksOnCurrentThread()); | 287 DCHECK(sync_task_runner_->RunsTasksOnCurrentThread()); |
| 284 registrar_.UpdateInvalidatorState(state); | 288 registrar_.UpdateInvalidatorState(state); |
| 285 } | 289 } |
| 286 | 290 |
| 291 ModelTypeSet FakeSyncManager::GetLastRefreshRequestTypes() { |
| 292 return last_refresh_request_types_; |
| 293 } |
| 294 |
| 287 } // namespace syncer | 295 } // namespace syncer |
| OLD | NEW |