| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/engine/fake_sync_engine.h" | 5 #include "components/sync/engine/fake_sync_engine.h" |
| 6 | 6 |
| 7 #include "components/sync/engine/activation_context.h" | 7 #include "components/sync/engine/activation_context.h" |
| 8 #include "components/sync/engine/sync_engine_host.h" | 8 #include "components/sync/engine/sync_engine_host.h" |
| 9 | 9 |
| 10 namespace syncer { | 10 namespace syncer { |
| 11 | 11 |
| 12 const char kTestCacheGuid[] = "test-guid"; | 12 const char kTestCacheGuid[] = "test-guid"; |
| 13 | 13 |
| 14 FakeSyncEngine::FakeSyncEngine() : fail_initial_download_(false) {} | 14 FakeSyncEngine::FakeSyncEngine() : fail_initial_download_(false) {} |
| 15 FakeSyncEngine::~FakeSyncEngine() {} | 15 FakeSyncEngine::~FakeSyncEngine() {} |
| 16 | 16 |
| 17 void FakeSyncEngine::Initialize(InitParams params) { | 17 void FakeSyncEngine::Initialize(InitParams params) { |
| 18 params.host->OnEngineInitialized(ModelTypeSet(), WeakHandle<JsBackend>(), | 18 params.host->OnEngineInitialized(ModelTypeSet(), WeakHandle<JsBackend>(), |
| 19 WeakHandle<DataTypeDebugInfoListener>(), | 19 WeakHandle<DataTypeDebugInfoListener>(), |
| 20 kTestCacheGuid, !fail_initial_download_); | 20 kTestCacheGuid, !fail_initial_download_); |
| 21 } | 21 } |
| 22 | 22 |
| 23 void FakeSyncEngine::TriggerRefresh(const ModelTypeSet& types) {} | 23 void FakeSyncEngine::TriggerRefresh(const ModelTypeSet& types) {} |
| 24 | 24 |
| 25 void FakeSyncEngine::UpdateCredentials(const SyncCredentials& credentials) {} | 25 void FakeSyncEngine::UpdateCredentials(const SyncCredentials& credentials) {} |
| 26 | 26 |
| 27 void FakeSyncEngine::StartConfiguration() {} | |
| 28 | |
| 29 void FakeSyncEngine::StartSyncingWithServer() {} | 27 void FakeSyncEngine::StartSyncingWithServer() {} |
| 30 | 28 |
| 31 void FakeSyncEngine::SetEncryptionPassphrase(const std::string& passphrase, | 29 void FakeSyncEngine::SetEncryptionPassphrase(const std::string& passphrase, |
| 32 bool is_explicit) {} | 30 bool is_explicit) {} |
| 33 | 31 |
| 34 bool FakeSyncEngine::SetDecryptionPassphrase(const std::string& passphrase) { | 32 bool FakeSyncEngine::SetDecryptionPassphrase(const std::string& passphrase) { |
| 35 return false; | 33 return false; |
| 36 } | 34 } |
| 37 | 35 |
| 38 void FakeSyncEngine::StopSyncingForShutdown() {} | 36 void FakeSyncEngine::StopSyncingForShutdown() {} |
| 39 | 37 |
| 40 void FakeSyncEngine::Shutdown(ShutdownReason reason) {} | 38 void FakeSyncEngine::Shutdown(ShutdownReason reason) {} |
| 41 | 39 |
| 42 void FakeSyncEngine::ConfigureDataTypes(ConfigureParams params) {} | 40 void FakeSyncEngine::ConfigureDataTypes(ConfigureParams params) {} |
| 43 | 41 |
| 44 void FakeSyncEngine::RegisterDirectoryDataType(ModelType type, | |
| 45 ModelSafeGroup group) {} | |
| 46 | |
| 47 void FakeSyncEngine::UnregisterDirectoryDataType(ModelType type) {} | |
| 48 | |
| 49 void FakeSyncEngine::EnableEncryptEverything() {} | 42 void FakeSyncEngine::EnableEncryptEverything() {} |
| 50 | 43 |
| 51 void FakeSyncEngine::ActivateDirectoryDataType( | 44 void FakeSyncEngine::ActivateDirectoryDataType( |
| 52 ModelType type, | 45 ModelType type, |
| 53 ModelSafeGroup group, | 46 ModelSafeGroup group, |
| 54 ChangeProcessor* change_processor) {} | 47 ChangeProcessor* change_processor) {} |
| 55 void FakeSyncEngine::DeactivateDirectoryDataType(ModelType type) {} | 48 void FakeSyncEngine::DeactivateDirectoryDataType(ModelType type) {} |
| 56 | 49 |
| 57 void FakeSyncEngine::ActivateNonBlockingDataType( | 50 void FakeSyncEngine::ActivateNonBlockingDataType( |
| 58 ModelType type, | 51 ModelType type, |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 108 | 101 |
| 109 void FakeSyncEngine::ClearServerData( | 102 void FakeSyncEngine::ClearServerData( |
| 110 const SyncManager::ClearServerDataCallback& callback) { | 103 const SyncManager::ClearServerDataCallback& callback) { |
| 111 callback.Run(); | 104 callback.Run(); |
| 112 } | 105 } |
| 113 | 106 |
| 114 void FakeSyncEngine::OnCookieJarChanged(bool account_mismatch, bool empty_jar) { | 107 void FakeSyncEngine::OnCookieJarChanged(bool account_mismatch, bool empty_jar) { |
| 115 } | 108 } |
| 116 | 109 |
| 117 } // namespace syncer | 110 } // namespace syncer |
| OLD | NEW |