OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 CHROME_BROWSER_SYNC_INTERNAL_API_SYNC_MANAGER_H_ | 5 #ifndef CHROME_BROWSER_SYNC_INTERNAL_API_SYNC_MANAGER_H_ |
6 #define CHROME_BROWSER_SYNC_INTERNAL_API_SYNC_MANAGER_H_ | 6 #define CHROME_BROWSER_SYNC_INTERNAL_API_SYNC_MANAGER_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
122 // issues. | 122 // issues. |
123 bool notifications_enabled; // True only if subscribed for notifications. | 123 bool notifications_enabled; // True only if subscribed for notifications. |
124 | 124 |
125 // Notifications counters updated by the actions in synapi. | 125 // Notifications counters updated by the actions in synapi. |
126 int notifications_received; | 126 int notifications_received; |
127 int notifiable_commits; | 127 int notifiable_commits; |
128 | 128 |
129 // The max number of consecutive errors from any component. | 129 // The max number of consecutive errors from any component. |
130 int max_consecutive_errors; | 130 int max_consecutive_errors; |
131 | 131 |
132 browser_sync::SyncProtocolError sync_protocol_error; | 132 // FIXME: is this used anywhere???? |
| 133 browser_sync::SyncOperationResult sync_protocol_error; |
133 | 134 |
134 int unsynced_count; | 135 int unsynced_count; |
135 | 136 |
136 int conflicting_count; | 137 int conflicting_count; |
137 bool syncing; | 138 bool syncing; |
138 // True after a client has done a first sync. | 139 // True after a client has done a first sync. |
139 bool initial_sync_ended; | 140 bool initial_sync_ended; |
140 // True if any syncer is stuck. | 141 // True if any syncer is stuck. |
141 bool syncer_stuck; | 142 bool syncer_stuck; |
142 | 143 |
(...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
374 // After a request to clear server data, these callbacks are invoked to | 375 // After a request to clear server data, these callbacks are invoked to |
375 // indicate success or failure. | 376 // indicate success or failure. |
376 virtual void OnClearServerDataSucceeded() = 0; | 377 virtual void OnClearServerDataSucceeded() = 0; |
377 virtual void OnClearServerDataFailed() = 0; | 378 virtual void OnClearServerDataFailed() = 0; |
378 | 379 |
379 // Called after we finish encrypting all appropriate datatypes. | 380 // Called after we finish encrypting all appropriate datatypes. |
380 virtual void OnEncryptionComplete( | 381 virtual void OnEncryptionComplete( |
381 const syncable::ModelTypeSet& encrypted_types) = 0; | 382 const syncable::ModelTypeSet& encrypted_types) = 0; |
382 | 383 |
383 virtual void OnActionableError( | 384 virtual void OnActionableError( |
384 const browser_sync::SyncProtocolError& sync_protocol_error) = 0; | 385 const browser_sync::SyncOperationResult& sync_operation_result) = 0; |
385 | 386 |
386 protected: | 387 protected: |
387 virtual ~Observer(); | 388 virtual ~Observer(); |
388 }; | 389 }; |
389 | 390 |
390 // Create an uninitialized SyncManager. Callers must Init() before using. | 391 // Create an uninitialized SyncManager. Callers must Init() before using. |
391 explicit SyncManager(const std::string& name); | 392 explicit SyncManager(const std::string& name); |
392 virtual ~SyncManager(); | 393 virtual ~SyncManager(); |
393 | 394 |
394 // Initialize the sync manager. |database_location| specifies the path of | 395 // Initialize the sync manager. |database_location| specifies the path of |
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
558 }; | 559 }; |
559 | 560 |
560 bool InitialSyncEndedForTypes(syncable::ModelTypeSet types, UserShare* share); | 561 bool InitialSyncEndedForTypes(syncable::ModelTypeSet types, UserShare* share); |
561 | 562 |
562 // Returns the string representation of a PassphraseRequiredReason value. | 563 // Returns the string representation of a PassphraseRequiredReason value. |
563 std::string PassphraseRequiredReasonToString(PassphraseRequiredReason reason); | 564 std::string PassphraseRequiredReasonToString(PassphraseRequiredReason reason); |
564 | 565 |
565 } // namespace sync_api | 566 } // namespace sync_api |
566 | 567 |
567 #endif // CHROME_BROWSER_SYNC_INTERNAL_API_SYNC_MANAGER_H_ | 568 #endif // CHROME_BROWSER_SYNC_INTERNAL_API_SYNC_MANAGER_H_ |
OLD | NEW |