| 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 365 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 376 virtual void OnClearServerDataSucceeded() = 0; | 376 virtual void OnClearServerDataSucceeded() = 0; |
| 377 virtual void OnClearServerDataFailed() = 0; | 377 virtual void OnClearServerDataFailed() = 0; |
| 378 | 378 |
| 379 // Called after we finish encrypting all appropriate datatypes. | 379 // Called after we finish encrypting all appropriate datatypes. |
| 380 virtual void OnEncryptionComplete( | 380 virtual void OnEncryptionComplete( |
| 381 const syncable::ModelTypeSet& encrypted_types) = 0; | 381 const syncable::ModelTypeSet& encrypted_types) = 0; |
| 382 | 382 |
| 383 virtual void OnActionableError( | 383 virtual void OnActionableError( |
| 384 const browser_sync::SyncProtocolError& sync_protocol_error) = 0; | 384 const browser_sync::SyncProtocolError& sync_protocol_error) = 0; |
| 385 | 385 |
| 386 // Called by the syncer when it encouters an unrecoverable error. |
| 387 virtual void OnUnrecoverableError( |
| 388 const tracked_objects::Location& location, |
| 389 const std::string& message) = 0; |
| 390 |
| 386 protected: | 391 protected: |
| 387 virtual ~Observer(); | 392 virtual ~Observer(); |
| 388 }; | 393 }; |
| 389 | 394 |
| 390 // Create an uninitialized SyncManager. Callers must Init() before using. | 395 // Create an uninitialized SyncManager. Callers must Init() before using. |
| 391 explicit SyncManager(const std::string& name); | 396 explicit SyncManager(const std::string& name); |
| 392 virtual ~SyncManager(); | 397 virtual ~SyncManager(); |
| 393 | 398 |
| 394 // Initialize the sync manager. |database_location| specifies the path of | 399 // Initialize the sync manager. |database_location| specifies the path of |
| 395 // the directory in which to locate a sqlite repository storing the syncer | 400 // the directory in which to locate a sqlite repository storing the syncer |
| (...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 568 }; | 573 }; |
| 569 | 574 |
| 570 bool InitialSyncEndedForTypes(syncable::ModelTypeSet types, UserShare* share); | 575 bool InitialSyncEndedForTypes(syncable::ModelTypeSet types, UserShare* share); |
| 571 | 576 |
| 572 // Returns the string representation of a PassphraseRequiredReason value. | 577 // Returns the string representation of a PassphraseRequiredReason value. |
| 573 std::string PassphraseRequiredReasonToString(PassphraseRequiredReason reason); | 578 std::string PassphraseRequiredReasonToString(PassphraseRequiredReason reason); |
| 574 | 579 |
| 575 } // namespace sync_api | 580 } // namespace sync_api |
| 576 | 581 |
| 577 #endif // CHROME_BROWSER_SYNC_INTERNAL_API_SYNC_MANAGER_H_ | 582 #endif // CHROME_BROWSER_SYNC_INTERNAL_API_SYNC_MANAGER_H_ |
| OLD | NEW |