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 475 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
486 // Switches the mode of operation to CONFIGURATION_MODE and | 486 // Switches the mode of operation to CONFIGURATION_MODE and |
487 // schedules a config task to fetch updates for |types|. | 487 // schedules a config task to fetch updates for |types|. |
488 void RequestConfig(const syncable::ModelTypeBitSet& types, | 488 void RequestConfig(const syncable::ModelTypeBitSet& types, |
489 sync_api::ConfigureReason reason); | 489 sync_api::ConfigureReason reason); |
490 | 490 |
491 void RequestCleanupDisabledTypes(); | 491 void RequestCleanupDisabledTypes(); |
492 | 492 |
493 // Request a clearing of all data on the server | 493 // Request a clearing of all data on the server |
494 void RequestClearServerData(); | 494 void RequestClearServerData(); |
495 | 495 |
496 // Add/remove change observers. | |
497 void AddChangeObserver(ChangeObserver* observer); | |
498 void RemoveChangeObserver(ChangeObserver* observer); | |
499 | |
500 // Adds a listener to be notified of sync events. | 496 // Adds a listener to be notified of sync events. |
501 // NOTE: It is OK (in fact, it's probably a good idea) to call this before | 497 // NOTE: It is OK (in fact, it's probably a good idea) to call this before |
502 // having received OnInitializationCompleted. | 498 // having received OnInitializationCompleted. |
503 void AddObserver(Observer* observer); | 499 void AddObserver(Observer* observer); |
504 | 500 |
505 // Remove the given observer. Make sure to call this if the | 501 // Remove the given observer. Make sure to call this if the |
506 // Observer is being destroyed so the SyncManager doesn't | 502 // Observer is being destroyed so the SyncManager doesn't |
507 // potentially dereference garbage. | 503 // potentially dereference garbage. |
508 void RemoveObserver(Observer* observer); | 504 void RemoveObserver(Observer* observer); |
509 | 505 |
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
598 syncable::ModelTypeSet GetTypesWithEmptyProgressMarkerToken( | 594 syncable::ModelTypeSet GetTypesWithEmptyProgressMarkerToken( |
599 const syncable::ModelTypeSet types, | 595 const syncable::ModelTypeSet types, |
600 sync_api::UserShare* share); | 596 sync_api::UserShare* share); |
601 | 597 |
602 // Returns the string representation of a PassphraseRequiredReason value. | 598 // Returns the string representation of a PassphraseRequiredReason value. |
603 std::string PassphraseRequiredReasonToString(PassphraseRequiredReason reason); | 599 std::string PassphraseRequiredReasonToString(PassphraseRequiredReason reason); |
604 | 600 |
605 } // namespace sync_api | 601 } // namespace sync_api |
606 | 602 |
607 #endif // CHROME_BROWSER_SYNC_INTERNAL_API_SYNC_MANAGER_H_ | 603 #endif // CHROME_BROWSER_SYNC_INTERNAL_API_SYNC_MANAGER_H_ |
OLD | NEW |