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) { |
95 sync_task_runner_ = base::ThreadTaskRunnerHandle::Get(); | 96 sync_task_runner_ = base::ThreadTaskRunnerHandle::Get(); |
96 PurgePartiallySyncedTypes(); | 97 PurgePartiallySyncedTypes(); |
97 | 98 |
98 test_user_share_.SetUp(); | 99 test_user_share_.SetUp(); |
99 UserShare* share = test_user_share_.user_share(); | 100 UserShare* share = test_user_share_.user_share(); |
100 for (ModelTypeSet::Iterator it = initial_sync_ended_types_.First(); | 101 for (ModelTypeSet::Iterator it = initial_sync_ended_types_.First(); |
101 it.Good(); it.Inc()) { | 102 it.Good(); it.Inc()) { |
102 TestUserShare::CreateRoot(it.Get(), share); | 103 TestUserShare::CreateRoot(it.Get(), share); |
103 } | 104 } |
104 | 105 |
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
202 | 203 |
203 SyncStatus FakeSyncManager::GetDetailedStatus() const { | 204 SyncStatus FakeSyncManager::GetDetailedStatus() const { |
204 NOTIMPLEMENTED(); | 205 NOTIMPLEMENTED(); |
205 return SyncStatus(); | 206 return SyncStatus(); |
206 } | 207 } |
207 | 208 |
208 void FakeSyncManager::SaveChanges() { | 209 void FakeSyncManager::SaveChanges() { |
209 // Do nothing. | 210 // Do nothing. |
210 } | 211 } |
211 | 212 |
212 void FakeSyncManager::StopSyncingForShutdown() { | |
213 } | |
214 | |
215 void FakeSyncManager::ShutdownOnSyncThread() { | 213 void FakeSyncManager::ShutdownOnSyncThread() { |
216 DCHECK(sync_task_runner_->RunsTasksOnCurrentThread()); | 214 DCHECK(sync_task_runner_->RunsTasksOnCurrentThread()); |
217 test_user_share_.TearDown(); | 215 test_user_share_.TearDown(); |
218 } | 216 } |
219 | 217 |
220 UserShare* FakeSyncManager::GetUserShare() { | 218 UserShare* FakeSyncManager::GetUserShare() { |
221 return test_user_share_.user_share(); | 219 return test_user_share_.user_share(); |
222 } | 220 } |
223 | 221 |
224 const std::string FakeSyncManager::cache_guid() { | 222 const std::string FakeSyncManager::cache_guid() { |
(...skipping 24 matching lines...) Expand all Loading... |
249 | 247 |
250 ModelTypeSet FakeSyncManager::GetLastRefreshRequestTypes() { | 248 ModelTypeSet FakeSyncManager::GetLastRefreshRequestTypes() { |
251 return last_refresh_request_types_; | 249 return last_refresh_request_types_; |
252 } | 250 } |
253 | 251 |
254 void FakeSyncManager::OnInvalidatorStateChange(InvalidatorState state) { | 252 void FakeSyncManager::OnInvalidatorStateChange(InvalidatorState state) { |
255 // Do nothing. | 253 // Do nothing. |
256 } | 254 } |
257 | 255 |
258 } // namespace syncer | 256 } // namespace syncer |
OLD | NEW |