| 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 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 84 ExtensionsActivity* extensions_activity, | 84 ExtensionsActivity* extensions_activity, |
| 85 ChangeDelegate* change_delegate, | 85 ChangeDelegate* change_delegate, |
| 86 const SyncCredentials& credentials, | 86 const SyncCredentials& credentials, |
| 87 const std::string& invalidator_client_id, | 87 const std::string& invalidator_client_id, |
| 88 const std::string& restored_key_for_bootstrapping, | 88 const std::string& restored_key_for_bootstrapping, |
| 89 const std::string& restored_keystore_key_for_bootstrapping, | 89 const std::string& restored_keystore_key_for_bootstrapping, |
| 90 InternalComponentsFactory* internal_components_factory, | 90 InternalComponentsFactory* internal_components_factory, |
| 91 Encryptor* encryptor, | 91 Encryptor* encryptor, |
| 92 scoped_ptr<UnrecoverableErrorHandler> unrecoverable_error_handler, | 92 scoped_ptr<UnrecoverableErrorHandler> unrecoverable_error_handler, |
| 93 ReportUnrecoverableErrorFunction report_unrecoverable_error_function, | 93 ReportUnrecoverableErrorFunction report_unrecoverable_error_function, |
| 94 bool use_oauth2_token, | 94 bool use_oauth2_token) { |
| 95 CancelationSignal* cancelation_signal) { | |
| 96 sync_task_runner_ = base::ThreadTaskRunnerHandle::Get(); | 95 sync_task_runner_ = base::ThreadTaskRunnerHandle::Get(); |
| 97 PurgePartiallySyncedTypes(); | 96 PurgePartiallySyncedTypes(); |
| 98 | 97 |
| 99 test_user_share_.SetUp(); | 98 test_user_share_.SetUp(); |
| 100 UserShare* share = test_user_share_.user_share(); | 99 UserShare* share = test_user_share_.user_share(); |
| 101 for (ModelTypeSet::Iterator it = initial_sync_ended_types_.First(); | 100 for (ModelTypeSet::Iterator it = initial_sync_ended_types_.First(); |
| 102 it.Good(); it.Inc()) { | 101 it.Good(); it.Inc()) { |
| 103 TestUserShare::CreateRoot(it.Get(), share); | 102 TestUserShare::CreateRoot(it.Get(), share); |
| 104 } | 103 } |
| 105 | 104 |
| (...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 203 | 202 |
| 204 SyncStatus FakeSyncManager::GetDetailedStatus() const { | 203 SyncStatus FakeSyncManager::GetDetailedStatus() const { |
| 205 NOTIMPLEMENTED(); | 204 NOTIMPLEMENTED(); |
| 206 return SyncStatus(); | 205 return SyncStatus(); |
| 207 } | 206 } |
| 208 | 207 |
| 209 void FakeSyncManager::SaveChanges() { | 208 void FakeSyncManager::SaveChanges() { |
| 210 // Do nothing. | 209 // Do nothing. |
| 211 } | 210 } |
| 212 | 211 |
| 212 void FakeSyncManager::StopSyncingForShutdown() { |
| 213 } |
| 214 |
| 213 void FakeSyncManager::ShutdownOnSyncThread() { | 215 void FakeSyncManager::ShutdownOnSyncThread() { |
| 214 DCHECK(sync_task_runner_->RunsTasksOnCurrentThread()); | 216 DCHECK(sync_task_runner_->RunsTasksOnCurrentThread()); |
| 215 test_user_share_.TearDown(); | 217 test_user_share_.TearDown(); |
| 216 } | 218 } |
| 217 | 219 |
| 218 UserShare* FakeSyncManager::GetUserShare() { | 220 UserShare* FakeSyncManager::GetUserShare() { |
| 219 return test_user_share_.user_share(); | 221 return test_user_share_.user_share(); |
| 220 } | 222 } |
| 221 | 223 |
| 222 const std::string FakeSyncManager::cache_guid() { | 224 const std::string FakeSyncManager::cache_guid() { |
| (...skipping 24 matching lines...) Expand all Loading... |
| 247 | 249 |
| 248 ModelTypeSet FakeSyncManager::GetLastRefreshRequestTypes() { | 250 ModelTypeSet FakeSyncManager::GetLastRefreshRequestTypes() { |
| 249 return last_refresh_request_types_; | 251 return last_refresh_request_types_; |
| 250 } | 252 } |
| 251 | 253 |
| 252 void FakeSyncManager::OnInvalidatorStateChange(InvalidatorState state) { | 254 void FakeSyncManager::OnInvalidatorStateChange(InvalidatorState state) { |
| 253 // Do nothing. | 255 // Do nothing. |
| 254 } | 256 } |
| 255 | 257 |
| 256 } // namespace syncer | 258 } // namespace syncer |
| OLD | NEW |