| 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 441 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 452 HttpPostProviderFactory* post_factory, | 452 HttpPostProviderFactory* post_factory, |
| 453 const browser_sync::ModelSafeRoutingInfo& model_safe_routing_info, | 453 const browser_sync::ModelSafeRoutingInfo& model_safe_routing_info, |
| 454 const std::vector<browser_sync::ModelSafeWorker*>& workers, | 454 const std::vector<browser_sync::ModelSafeWorker*>& workers, |
| 455 browser_sync::ExtensionsActivityMonitor* | 455 browser_sync::ExtensionsActivityMonitor* |
| 456 extensions_activity_monitor, | 456 extensions_activity_monitor, |
| 457 ChangeDelegate* change_delegate, | 457 ChangeDelegate* change_delegate, |
| 458 const std::string& user_agent, | 458 const std::string& user_agent, |
| 459 const SyncCredentials& credentials, | 459 const SyncCredentials& credentials, |
| 460 sync_notifier::SyncNotifier* sync_notifier, | 460 sync_notifier::SyncNotifier* sync_notifier, |
| 461 const std::string& restored_key_for_bootstrapping, | 461 const std::string& restored_key_for_bootstrapping, |
| 462 const std::string& restored_keystore_key_for_bootstrapping, |
| 462 bool keystore_encryption_enabled, | 463 bool keystore_encryption_enabled, |
| 463 TestingMode testing_mode, | 464 TestingMode testing_mode, |
| 464 browser_sync::Encryptor* encryptor, | 465 browser_sync::Encryptor* encryptor, |
| 465 browser_sync::UnrecoverableErrorHandler* | 466 browser_sync::UnrecoverableErrorHandler* |
| 466 unrecoverable_error_handler, | 467 unrecoverable_error_handler, |
| 467 browser_sync::ReportUnrecoverableErrorFunction | 468 browser_sync::ReportUnrecoverableErrorFunction |
| 468 report_unrecoverable_error_function); | 469 report_unrecoverable_error_function); |
| 469 | 470 |
| 470 // Throw an unrecoverable error from a transaction (mostly used for | 471 // Throw an unrecoverable error from a transaction (mostly used for |
| 471 // testing). | 472 // testing). |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 529 // potentially dereference garbage. | 530 // potentially dereference garbage. |
| 530 void RemoveObserver(Observer* observer); | 531 void RemoveObserver(Observer* observer); |
| 531 | 532 |
| 532 // Status-related getter. May be called on any thread. | 533 // Status-related getter. May be called on any thread. |
| 533 Status GetDetailedStatus() const; | 534 Status GetDetailedStatus() const; |
| 534 | 535 |
| 535 // Whether or not the Nigori node is encrypted using an explicit passphrase. | 536 // Whether or not the Nigori node is encrypted using an explicit passphrase. |
| 536 // May be called on any thread. | 537 // May be called on any thread. |
| 537 bool IsUsingExplicitPassphrase(); | 538 bool IsUsingExplicitPassphrase(); |
| 538 | 539 |
| 540 // Extracts the keystore encryption bootstrap token if a keystore key existed. |
| 541 // Returns true if bootstrap token successfully extracted, false otherwise. |
| 542 bool GetKeystoreKeyBootstrapToken(std::string* token); |
| 543 |
| 539 // Call periodically from a database-safe thread to persist recent changes | 544 // Call periodically from a database-safe thread to persist recent changes |
| 540 // to the syncapi model. | 545 // to the syncapi model. |
| 541 void SaveChanges(); | 546 void SaveChanges(); |
| 542 | 547 |
| 543 // Initiates shutdown of various components in the sync engine. Must be | 548 // Initiates shutdown of various components in the sync engine. Must be |
| 544 // called from the main thread to allow preempting ongoing tasks on the sync | 549 // called from the main thread to allow preempting ongoing tasks on the sync |
| 545 // loop (that may be blocked on I/O). The semantics of |callback| are the | 550 // loop (that may be blocked on I/O). The semantics of |callback| are the |
| 546 // same as with StartConfigurationMode. If provided and a scheduler / sync | 551 // same as with StartConfigurationMode. If provided and a scheduler / sync |
| 547 // loop exists, it will be invoked from the sync loop by the scheduler to | 552 // loop exists, it will be invoked from the sync loop by the scheduler to |
| 548 // notify that all work has been flushed + cancelled, and it is idle. | 553 // notify that all work has been flushed + cancelled, and it is idle. |
| (...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 639 sync_api::UserShare* share); | 644 sync_api::UserShare* share); |
| 640 | 645 |
| 641 const char* ConnectionStatusToString(ConnectionStatus status); | 646 const char* ConnectionStatusToString(ConnectionStatus status); |
| 642 | 647 |
| 643 // Returns the string representation of a PassphraseRequiredReason value. | 648 // Returns the string representation of a PassphraseRequiredReason value. |
| 644 const char* PassphraseRequiredReasonToString(PassphraseRequiredReason reason); | 649 const char* PassphraseRequiredReasonToString(PassphraseRequiredReason reason); |
| 645 | 650 |
| 646 } // namespace sync_api | 651 } // namespace sync_api |
| 647 | 652 |
| 648 #endif // SYNC_INTERNAL_API_SYNC_MANAGER_H_ | 653 #endif // SYNC_INTERNAL_API_SYNC_MANAGER_H_ |
| OLD | NEW |