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_PUBLIC_SYNC_MANAGER_H_ | 5 #ifndef SYNC_INTERNAL_API_PUBLIC_SYNC_MANAGER_H_ |
6 #define SYNC_INTERNAL_API_PUBLIC_SYNC_MANAGER_H_ | 6 #define SYNC_INTERNAL_API_PUBLIC_SYNC_MANAGER_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 384 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
395 syncer::ReportUnrecoverableErrorFunction | 395 syncer::ReportUnrecoverableErrorFunction |
396 report_unrecoverable_error_function); | 396 report_unrecoverable_error_function); |
397 | 397 |
398 // Throw an unrecoverable error from a transaction (mostly used for | 398 // Throw an unrecoverable error from a transaction (mostly used for |
399 // testing). | 399 // testing). |
400 void ThrowUnrecoverableError(); | 400 void ThrowUnrecoverableError(); |
401 | 401 |
402 // Returns the set of types for which we have stored some sync data. | 402 // Returns the set of types for which we have stored some sync data. |
403 syncer::ModelTypeSet InitialSyncEndedTypes(); | 403 syncer::ModelTypeSet InitialSyncEndedTypes(); |
404 | 404 |
405 // Returns those types within |types| that have an empty progress marker | |
406 // token. | |
407 syncer::ModelTypeSet GetTypesWithEmptyProgressMarkerToken( | |
rlarocque
2012/07/11 22:44:42
Does this need to be public? Does it need to be e
Nicolas Zea
2012/07/11 23:04:16
It's primarily public for testing. Both the SyncMa
| |
408 syncer::ModelTypeSet types); | |
409 | |
410 // Purge from the directory those types with non-empty progress markers | |
411 // but without initial synced ended set. | |
412 // Returns false if an error occurred, true otherwise. | |
413 bool PurgePartiallySyncedTypes(); | |
414 | |
405 // Update tokens that we're using in Sync. Email must stay the same. | 415 // Update tokens that we're using in Sync. Email must stay the same. |
406 void UpdateCredentials(const SyncCredentials& credentials); | 416 void UpdateCredentials(const SyncCredentials& credentials); |
407 | 417 |
408 // Called when the user disables or enables a sync type. | 418 // Called when the user disables or enables a sync type. |
409 void UpdateEnabledTypes(const syncer::ModelTypeSet& enabled_types); | 419 void UpdateEnabledTypes(const syncer::ModelTypeSet& enabled_types); |
410 | 420 |
411 // Put the syncer in normal mode ready to perform nudges and polls. | 421 // Put the syncer in normal mode ready to perform nudges and polls. |
412 void StartSyncingNormally( | 422 void StartSyncingNormally( |
413 const syncer::ModelSafeRoutingInfo& routing_info); | 423 const syncer::ModelSafeRoutingInfo& routing_info); |
414 | 424 |
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
553 base::ThreadChecker thread_checker_; | 563 base::ThreadChecker thread_checker_; |
554 | 564 |
555 // An opaque pointer to the nested private class. | 565 // An opaque pointer to the nested private class. |
556 SyncInternal* data_; | 566 SyncInternal* data_; |
557 | 567 |
558 DISALLOW_COPY_AND_ASSIGN(SyncManager); | 568 DISALLOW_COPY_AND_ASSIGN(SyncManager); |
559 }; | 569 }; |
560 | 570 |
561 bool InitialSyncEndedForTypes(syncer::ModelTypeSet types, UserShare* share); | 571 bool InitialSyncEndedForTypes(syncer::ModelTypeSet types, UserShare* share); |
562 | 572 |
563 syncer::ModelTypeSet GetTypesWithEmptyProgressMarkerToken( | |
564 syncer::ModelTypeSet types, | |
565 syncer::UserShare* share); | |
566 | |
567 const char* ConnectionStatusToString(ConnectionStatus status); | 573 const char* ConnectionStatusToString(ConnectionStatus status); |
568 | 574 |
569 // Returns the string representation of a PassphraseRequiredReason value. | 575 // Returns the string representation of a PassphraseRequiredReason value. |
570 const char* PassphraseRequiredReasonToString(PassphraseRequiredReason reason); | 576 const char* PassphraseRequiredReasonToString(PassphraseRequiredReason reason); |
571 | 577 |
572 } // namespace syncer | 578 } // namespace syncer |
573 | 579 |
574 #endif // SYNC_INTERNAL_API_PUBLIC_SYNC_MANAGER_H_ | 580 #endif // SYNC_INTERNAL_API_PUBLIC_SYNC_MANAGER_H_ |
OLD | NEW |