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 425 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
436 ChangeDelegate* change_delegate, | 436 ChangeDelegate* change_delegate, |
437 const std::string& user_agent, | 437 const std::string& user_agent, |
438 const SyncCredentials& credentials, | 438 const SyncCredentials& credentials, |
439 sync_notifier::SyncNotifier* sync_notifier, | 439 sync_notifier::SyncNotifier* sync_notifier, |
440 const std::string& restored_key_for_bootstrapping, | 440 const std::string& restored_key_for_bootstrapping, |
441 bool setup_for_test_mode); | 441 bool setup_for_test_mode); |
442 | 442 |
443 // Checks if the sync server is reachable. | 443 // Checks if the sync server is reachable. |
444 void CheckServerReachable(); | 444 void CheckServerReachable(); |
445 | 445 |
446 // Returns the username last used for a successful authentication. | |
447 // Returns empty if there is no such username. May be called on any | |
448 // thread. | |
449 const std::string& GetAuthenticatedUsername(); | |
450 | |
451 // Check if the database has been populated with a full "initial" download of | 446 // Check if the database has been populated with a full "initial" download of |
452 // sync items for each data type currently present in the routing info. | 447 // sync items for each data type currently present in the routing info. |
453 // Prerequisite for calling this is that OnInitializationComplete has been | 448 // Prerequisite for calling this is that OnInitializationComplete has been |
454 // called. May be called from any thread. | 449 // called. May be called from any thread. |
455 bool InitialSyncEndedForAllEnabledTypes(); | 450 bool InitialSyncEndedForAllEnabledTypes(); |
456 | 451 |
457 // Update tokens that we're using in Sync. Email must stay the same. | 452 // Update tokens that we're using in Sync. Email must stay the same. |
458 void UpdateCredentials(const SyncCredentials& credentials); | 453 void UpdateCredentials(const SyncCredentials& credentials); |
459 | 454 |
460 // Called when the user disables or enables a sync type. | 455 // Called when the user disables or enables a sync type. |
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
597 syncable::ModelTypeSet GetTypesWithEmptyProgressMarkerToken( | 592 syncable::ModelTypeSet GetTypesWithEmptyProgressMarkerToken( |
598 const syncable::ModelTypeSet types, | 593 const syncable::ModelTypeSet types, |
599 sync_api::UserShare* share); | 594 sync_api::UserShare* share); |
600 | 595 |
601 // Returns the string representation of a PassphraseRequiredReason value. | 596 // Returns the string representation of a PassphraseRequiredReason value. |
602 std::string PassphraseRequiredReasonToString(PassphraseRequiredReason reason); | 597 std::string PassphraseRequiredReasonToString(PassphraseRequiredReason reason); |
603 | 598 |
604 } // namespace sync_api | 599 } // namespace sync_api |
605 | 600 |
606 #endif // CHROME_BROWSER_SYNC_INTERNAL_API_SYNC_MANAGER_H_ | 601 #endif // CHROME_BROWSER_SYNC_INTERNAL_API_SYNC_MANAGER_H_ |
OLD | NEW |