| OLD | NEW |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 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 #ifndef COMPONENTS_SYNC_ENGINE_SYNC_ENGINE_H_ | 5 #ifndef COMPONENTS_SYNC_ENGINE_SYNC_ENGINE_H_ |
| 6 #define COMPONENTS_SYNC_ENGINE_SYNC_ENGINE_H_ | 6 #define COMPONENTS_SYNC_ENGINE_SYNC_ENGINE_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <memory> | 9 #include <memory> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 88 // |saved_nigori_state| is optional nigori state to restore from a previous | 88 // |saved_nigori_state| is optional nigori state to restore from a previous |
| 89 // engine instance. May be null. | 89 // engine instance. May be null. |
| 90 virtual void Initialize(InitParams params) = 0; | 90 virtual void Initialize(InitParams params) = 0; |
| 91 | 91 |
| 92 // Inform the engine to trigger a sync cycle for |types|. | 92 // Inform the engine to trigger a sync cycle for |types|. |
| 93 virtual void TriggerRefresh(const ModelTypeSet& types) = 0; | 93 virtual void TriggerRefresh(const ModelTypeSet& types) = 0; |
| 94 | 94 |
| 95 // Updates the engine's SyncCredentials. | 95 // Updates the engine's SyncCredentials. |
| 96 virtual void UpdateCredentials(const SyncCredentials& credentials) = 0; | 96 virtual void UpdateCredentials(const SyncCredentials& credentials) = 0; |
| 97 | 97 |
| 98 // Switches sync engine into configuration mode. In this mode only initial |
| 99 // data for newly enabled types is downloaded from server. No local changes |
| 100 // are committed to server. |
| 101 virtual void StartConfiguration() = 0; |
| 102 |
| 98 // This starts the sync engine running a Syncer object to communicate with | 103 // This starts the sync engine running a Syncer object to communicate with |
| 99 // sync servers. Until this is called, no changes will leave or enter this | 104 // sync servers. Until this is called, no changes will leave or enter this |
| 100 // browser from the cloud / sync servers. | 105 // browser from the cloud / sync servers. |
| 101 virtual void StartSyncingWithServer() = 0; | 106 virtual void StartSyncingWithServer() = 0; |
| 102 | 107 |
| 103 // Asynchronously set a new passphrase for encryption. Note that it is an | 108 // Asynchronously set a new passphrase for encryption. Note that it is an |
| 104 // error to call SetEncryptionPassphrase under the following circumstances: | 109 // error to call SetEncryptionPassphrase under the following circumstances: |
| 105 // - An explicit passphrase has already been set | 110 // - An explicit passphrase has already been set |
| 106 // - |is_explicit| is true and we have pending keys. | 111 // - |is_explicit| is true and we have pending keys. |
| 107 // When |is_explicit| is false, a couple of things could happen: | 112 // When |is_explicit| is false, a couple of things could happen: |
| (...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 196 // See SyncManager::OnCookieJarChanged. | 201 // See SyncManager::OnCookieJarChanged. |
| 197 virtual void OnCookieJarChanged(bool account_mismatch, bool empty_jar) = 0; | 202 virtual void OnCookieJarChanged(bool account_mismatch, bool empty_jar) = 0; |
| 198 | 203 |
| 199 private: | 204 private: |
| 200 DISALLOW_COPY_AND_ASSIGN(SyncEngine); | 205 DISALLOW_COPY_AND_ASSIGN(SyncEngine); |
| 201 }; | 206 }; |
| 202 | 207 |
| 203 } // namespace syncer | 208 } // namespace syncer |
| 204 | 209 |
| 205 #endif // COMPONENTS_SYNC_ENGINE_SYNC_ENGINE_H_ | 210 #endif // COMPONENTS_SYNC_ENGINE_SYNC_ENGINE_H_ |
| OLD | NEW |