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