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 #ifndef SYNC_INTERNAL_API_SYNC_MANAGER_H_ | 5 #ifndef SYNC_INTERNAL_API_SYNC_MANAGER_H_ |
6 #define SYNC_INTERNAL_API_SYNC_MANAGER_H_ | 6 #define SYNC_INTERNAL_API_SYNC_MANAGER_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 13 matching lines...) Expand all Loading... |
24 #include "sync/util/weak_handle.h" | 24 #include "sync/util/weak_handle.h" |
25 | 25 |
26 namespace browser_sync { | 26 namespace browser_sync { |
27 class Encryptor; | 27 class Encryptor; |
28 class ExtensionsActivityMonitor; | 28 class ExtensionsActivityMonitor; |
29 class JsBackend; | 29 class JsBackend; |
30 class JsEventHandler; | 30 class JsEventHandler; |
31 class ModelSafeWorkerRegistrar; | 31 class ModelSafeWorkerRegistrar; |
32 | 32 |
33 namespace sessions { | 33 namespace sessions { |
34 struct SyncSessionSnapshot; | 34 class SyncSessionSnapshot; |
35 } // namespace sessions | 35 } // namespace sessions |
36 } // namespace browser_sync | 36 } // namespace browser_sync |
37 | 37 |
38 namespace sync_notifier { | 38 namespace sync_notifier { |
39 class SyncNotifier; | 39 class SyncNotifier; |
40 } // namespace sync_notifier | 40 } // namespace sync_notifier |
41 | 41 |
42 namespace sync_pb { | 42 namespace sync_pb { |
43 class EncryptedData; | 43 class EncryptedData; |
44 } // namespace sync_pb | 44 } // namespace sync_pb |
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
245 | 245 |
246 // An interface the embedding application implements to receive | 246 // An interface the embedding application implements to receive |
247 // notifications from the SyncManager. Register an observer via | 247 // notifications from the SyncManager. Register an observer via |
248 // SyncManager::AddObserver. All methods are called only on the | 248 // SyncManager::AddObserver. All methods are called only on the |
249 // sync thread. | 249 // sync thread. |
250 class Observer { | 250 class Observer { |
251 public: | 251 public: |
252 // A round-trip sync-cycle took place and the syncer has resolved any | 252 // A round-trip sync-cycle took place and the syncer has resolved any |
253 // conflicts that may have arisen. | 253 // conflicts that may have arisen. |
254 virtual void OnSyncCycleCompleted( | 254 virtual void OnSyncCycleCompleted( |
255 const browser_sync::sessions::SyncSessionSnapshot* snapshot) = 0; | 255 const browser_sync::sessions::SyncSessionSnapshot& snapshot) = 0; |
256 | 256 |
257 // Called when the status of the connection to the sync server has | 257 // Called when the status of the connection to the sync server has |
258 // changed. | 258 // changed. |
259 virtual void OnConnectionStatusChange(ConnectionStatus status) = 0; | 259 virtual void OnConnectionStatusChange(ConnectionStatus status) = 0; |
260 | 260 |
261 // Called when a new auth token is provided by the sync server. | 261 // Called when a new auth token is provided by the sync server. |
262 virtual void OnUpdatedToken(const std::string& token) = 0; | 262 virtual void OnUpdatedToken(const std::string& token) = 0; |
263 | 263 |
264 // Called when user interaction is required to obtain a valid passphrase. | 264 // Called when user interaction is required to obtain a valid passphrase. |
265 // - If the passphrase is required for encryption, |reason| will be | 265 // - If the passphrase is required for encryption, |reason| will be |
(...skipping 369 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
635 sync_api::UserShare* share); | 635 sync_api::UserShare* share); |
636 | 636 |
637 const char* ConnectionStatusToString(ConnectionStatus status); | 637 const char* ConnectionStatusToString(ConnectionStatus status); |
638 | 638 |
639 // Returns the string representation of a PassphraseRequiredReason value. | 639 // Returns the string representation of a PassphraseRequiredReason value. |
640 const char* PassphraseRequiredReasonToString(PassphraseRequiredReason reason); | 640 const char* PassphraseRequiredReasonToString(PassphraseRequiredReason reason); |
641 | 641 |
642 } // namespace sync_api | 642 } // namespace sync_api |
643 | 643 |
644 #endif // SYNC_INTERNAL_API_SYNC_MANAGER_H_ | 644 #endif // SYNC_INTERNAL_API_SYNC_MANAGER_H_ |
OLD | NEW |