| 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 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 439 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 450 // *not* override an explicit passphrase set previously. | 450 // *not* override an explicit passphrase set previously. |
| 451 void SetPassphrase(const std::string& passphrase, bool is_explicit); | 451 void SetPassphrase(const std::string& passphrase, bool is_explicit); |
| 452 | 452 |
| 453 // Set the datatypes we want to encrypt and encrypt any nodes as necessary. | 453 // Set the datatypes we want to encrypt and encrypt any nodes as necessary. |
| 454 // Note: |encrypted_types| will be unioned with the current set of encrypted | 454 // Note: |encrypted_types| will be unioned with the current set of encrypted |
| 455 // types, as we do not currently support decrypting datatypes. | 455 // types, as we do not currently support decrypting datatypes. |
| 456 void EncryptDataTypes(const syncable::ModelTypeSet& encrypted_types); | 456 void EncryptDataTypes(const syncable::ModelTypeSet& encrypted_types); |
| 457 | 457 |
| 458 // Puts the SyncScheduler into a mode where no normal nudge or poll traffic | 458 // Puts the SyncScheduler into a mode where no normal nudge or poll traffic |
| 459 // will occur, but calls to RequestConfig will be supported. If |callback| | 459 // will occur, but calls to RequestConfig will be supported. If |callback| |
| 460 // is provided, it will be invoked (from the internal SyncScheduler) when | 460 // is non-null, it will be invoked (from the internal SyncScheduler) when |
| 461 // the thread has changed to configuration mode. | 461 // the thread has changed to configuration mode. |
| 462 void StartConfigurationMode(ModeChangeCallback* callback); | 462 void StartConfigurationMode(const base::Closure& callback); |
| 463 | 463 |
| 464 // Switches the mode of operation to CONFIGURATION_MODE and | 464 // Switches the mode of operation to CONFIGURATION_MODE and |
| 465 // schedules a config task to fetch updates for |types|. | 465 // schedules a config task to fetch updates for |types|. |
| 466 void RequestConfig(const syncable::ModelTypeBitSet& types, | 466 void RequestConfig(const syncable::ModelTypeBitSet& types, |
| 467 sync_api::ConfigureReason reason); | 467 sync_api::ConfigureReason reason); |
| 468 | 468 |
| 469 void RequestCleanupDisabledTypes(); | 469 void RequestCleanupDisabledTypes(const base::Closure& callback); |
| 470 | 470 |
| 471 // Request a clearing of all data on the server | 471 // Request a clearing of all data on the server |
| 472 void RequestClearServerData(); | 472 void RequestClearServerData(); |
| 473 | 473 |
| 474 // Adds a listener to be notified of sync events. | 474 // Adds a listener to be notified of sync events. |
| 475 // NOTE: It is OK (in fact, it's probably a good idea) to call this before | 475 // NOTE: It is OK (in fact, it's probably a good idea) to call this before |
| 476 // having received OnInitializationCompleted. | 476 // having received OnInitializationCompleted. |
| 477 void AddObserver(Observer* observer); | 477 void AddObserver(Observer* observer); |
| 478 | 478 |
| 479 // Remove the given observer. Make sure to call this if the | 479 // Remove the given observer. Make sure to call this if the |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 544 }; | 544 }; |
| 545 | 545 |
| 546 bool InitialSyncEndedForTypes(syncable::ModelTypeSet types, UserShare* share); | 546 bool InitialSyncEndedForTypes(syncable::ModelTypeSet types, UserShare* share); |
| 547 | 547 |
| 548 // Returns the string representation of a PassphraseRequiredReason value. | 548 // Returns the string representation of a PassphraseRequiredReason value. |
| 549 std::string PassphraseRequiredReasonToString(PassphraseRequiredReason reason); | 549 std::string PassphraseRequiredReasonToString(PassphraseRequiredReason reason); |
| 550 | 550 |
| 551 } // namespace sync_api | 551 } // namespace sync_api |
| 552 | 552 |
| 553 #endif // CHROME_BROWSER_SYNC_INTERNAL_API_SYNC_MANAGER_H_ | 553 #endif // CHROME_BROWSER_SYNC_INTERNAL_API_SYNC_MANAGER_H_ |
| OLD | NEW |