| 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_CORE_SYNC_MANAGER_H_ | 5 #ifndef COMPONENTS_SYNC_CORE_SYNC_MANAGER_H_ |
| 6 #define COMPONENTS_SYNC_CORE_SYNC_MANAGER_H_ | 6 #define COMPONENTS_SYNC_CORE_SYNC_MANAGER_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <memory> | 10 #include <memory> |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 44 | 44 |
| 45 class BaseTransaction; | 45 class BaseTransaction; |
| 46 class CancelationSignal; | 46 class CancelationSignal; |
| 47 class DataTypeDebugInfoListener; | 47 class DataTypeDebugInfoListener; |
| 48 class Encryptor; | 48 class Encryptor; |
| 49 class ExtensionsActivity; | 49 class ExtensionsActivity; |
| 50 class InternalComponentsFactory; | 50 class InternalComponentsFactory; |
| 51 class JsBackend; | 51 class JsBackend; |
| 52 class JsEventHandler; | 52 class JsEventHandler; |
| 53 class ProtocolEvent; | 53 class ProtocolEvent; |
| 54 class SyncCycleSnapshot; |
| 54 class SyncEncryptionHandler; | 55 class SyncEncryptionHandler; |
| 55 class SyncScheduler; | 56 class SyncScheduler; |
| 56 class TypeDebugInfoObserver; | 57 class TypeDebugInfoObserver; |
| 57 class UnrecoverableErrorHandler; | 58 class UnrecoverableErrorHandler; |
| 58 struct Experiments; | 59 struct Experiments; |
| 59 struct UserShare; | 60 struct UserShare; |
| 60 | 61 |
| 61 namespace sessions { | |
| 62 class SyncSessionSnapshot; | |
| 63 } // namespace sessions | |
| 64 | |
| 65 // Contains everything needed to talk to and identify a user account. | 62 // Contains everything needed to talk to and identify a user account. |
| 66 struct SyncCredentials { | 63 struct SyncCredentials { |
| 67 SyncCredentials(); | 64 SyncCredentials(); |
| 68 SyncCredentials(const SyncCredentials& other); | 65 SyncCredentials(const SyncCredentials& other); |
| 69 ~SyncCredentials(); | 66 ~SyncCredentials(); |
| 70 | 67 |
| 71 // Account_id of signed in account. | 68 // Account_id of signed in account. |
| 72 std::string account_id; | 69 std::string account_id; |
| 73 | 70 |
| 74 // The email associated with this account. | 71 // The email associated with this account. |
| (...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 175 }; | 172 }; |
| 176 | 173 |
| 177 // An interface the embedding application implements to receive | 174 // An interface the embedding application implements to receive |
| 178 // notifications from the SyncManager. Register an observer via | 175 // notifications from the SyncManager. Register an observer via |
| 179 // SyncManager::AddObserver. All methods are called only on the | 176 // SyncManager::AddObserver. All methods are called only on the |
| 180 // sync thread. | 177 // sync thread. |
| 181 class Observer { | 178 class Observer { |
| 182 public: | 179 public: |
| 183 // A round-trip sync-cycle took place and the syncer has resolved any | 180 // A round-trip sync-cycle took place and the syncer has resolved any |
| 184 // conflicts that may have arisen. | 181 // conflicts that may have arisen. |
| 185 virtual void OnSyncCycleCompleted( | 182 virtual void OnSyncCycleCompleted(const SyncCycleSnapshot& snapshot) = 0; |
| 186 const sessions::SyncSessionSnapshot& snapshot) = 0; | |
| 187 | 183 |
| 188 // Called when the status of the connection to the sync server has | 184 // Called when the status of the connection to the sync server has |
| 189 // changed. | 185 // changed. |
| 190 virtual void OnConnectionStatusChange(ConnectionStatus status) = 0; | 186 virtual void OnConnectionStatusChange(ConnectionStatus status) = 0; |
| 191 | 187 |
| 192 // Called when initialization is complete to the point that SyncManager can | 188 // Called when initialization is complete to the point that SyncManager can |
| 193 // process changes. This does not necessarily mean authentication succeeded | 189 // process changes. This does not necessarily mean authentication succeeded |
| 194 // or that the SyncManager is online. | 190 // or that the SyncManager is online. |
| 195 // IMPORTANT: Creating any type of transaction before receiving this | 191 // IMPORTANT: Creating any type of transaction before receiving this |
| 196 // notification is illegal! | 192 // notification is illegal! |
| (...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 401 | 397 |
| 402 // Updates Sync's tracking of whether the cookie jar has a mismatch with the | 398 // Updates Sync's tracking of whether the cookie jar has a mismatch with the |
| 403 // chrome account. See ClientConfigParams proto message for more info. | 399 // chrome account. See ClientConfigParams proto message for more info. |
| 404 // Note: this does not trigger a sync cycle. It just updates the sync context. | 400 // Note: this does not trigger a sync cycle. It just updates the sync context. |
| 405 virtual void OnCookieJarChanged(bool account_mismatch, bool empty_jar) = 0; | 401 virtual void OnCookieJarChanged(bool account_mismatch, bool empty_jar) = 0; |
| 406 }; | 402 }; |
| 407 | 403 |
| 408 } // namespace syncer | 404 } // namespace syncer |
| 409 | 405 |
| 410 #endif // COMPONENTS_SYNC_CORE_SYNC_MANAGER_H_ | 406 #endif // COMPONENTS_SYNC_CORE_SYNC_MANAGER_H_ |
| OLD | NEW |