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 CHROME_BROWSER_SYNC_PROFILE_SYNC_SERVICE_H_ | 5 #ifndef CHROME_BROWSER_SYNC_PROFILE_SYNC_SERVICE_H_ |
6 #define CHROME_BROWSER_SYNC_PROFILE_SYNC_SERVICE_H_ | 6 #define CHROME_BROWSER_SYNC_PROFILE_SYNC_SERVICE_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <utility> | 9 #include <utility> |
10 #include <vector> | 10 #include <vector> |
(...skipping 672 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
683 void ConfigurePriorityDataTypes(); | 683 void ConfigurePriorityDataTypes(); |
684 | 684 |
685 // Helper to install and configure a data type manager. | 685 // Helper to install and configure a data type manager. |
686 void ConfigureDataTypeManager(); | 686 void ConfigureDataTypeManager(); |
687 | 687 |
688 // Shuts down the backend sync components. | 688 // Shuts down the backend sync components. |
689 // |option| indicates if syncing is being disabled or not, and whether | 689 // |option| indicates if syncing is being disabled or not, and whether |
690 // to claim ownership of sync thread from backend. | 690 // to claim ownership of sync thread from backend. |
691 void ShutdownImpl(browser_sync::SyncBackendHost::ShutdownOption option); | 691 void ShutdownImpl(browser_sync::SyncBackendHost::ShutdownOption option); |
692 | 692 |
693 // Return SyncCredentials from the TokenService. | 693 // Return SyncCredentials from the OAuth2TokenService. |
694 syncer::SyncCredentials GetCredentials(); | 694 syncer::SyncCredentials GetCredentials(); |
695 | 695 |
696 virtual syncer::WeakHandle<syncer::JsEventHandler> GetJsEventHandler(); | 696 virtual syncer::WeakHandle<syncer::JsEventHandler> GetJsEventHandler(); |
697 | 697 |
698 // Test need to override this to create backends that allow setting up | 698 // Test need to override this to create backends that allow setting up |
699 // initial conditions, such as populating sync nodes. | 699 // initial conditions, such as populating sync nodes. |
700 // | 700 // |
701 // TODO(akalin): Figure out a better way to do this. Ideally, we'd | 701 // TODO(akalin): Figure out a better way to do this. Ideally, we'd |
702 // construct the backend outside this class and pass it in to the | 702 // construct the backend outside this class and pass it in to the |
703 // contructor or Initialize(). | 703 // contructor or Initialize(). |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
775 // OnPassphraseRequired() but no data types are enabled). | 775 // OnPassphraseRequired() but no data types are enabled). |
776 void ResolvePassphraseRequired(); | 776 void ResolvePassphraseRequired(); |
777 | 777 |
778 // During initial signin, ProfileSyncService caches the user's signin | 778 // During initial signin, ProfileSyncService caches the user's signin |
779 // passphrase so it can be used to encrypt/decrypt data after sync starts up. | 779 // passphrase so it can be used to encrypt/decrypt data after sync starts up. |
780 // This routine is invoked once the backend has started up to use the | 780 // This routine is invoked once the backend has started up to use the |
781 // cached passphrase and clear it out when it is done. | 781 // cached passphrase and clear it out when it is done. |
782 void ConsumeCachedPassphraseIfPossible(); | 782 void ConsumeCachedPassphraseIfPossible(); |
783 | 783 |
784 // RequestAccessToken initiates RPC to request downscoped access token from | 784 // RequestAccessToken initiates RPC to request downscoped access token from |
785 // refresh token. This happens when TokenService loads OAuth2 login token and | 785 // refresh token. This happens when a new OAuth2 login token is loaded and |
786 // when sync server returns AUTH_ERROR which indicates it is time to refresh | 786 // when sync server returns AUTH_ERROR which indicates it is time to refresh |
787 // token. | 787 // token. |
788 virtual void RequestAccessToken(); | 788 virtual void RequestAccessToken(); |
789 | 789 |
790 // If |delete_sync_data_folder| is true, then this method will delete all | 790 // If |delete_sync_data_folder| is true, then this method will delete all |
791 // previous "Sync Data" folders. (useful if the folder is partial/corrupt). | 791 // previous "Sync Data" folders. (useful if the folder is partial/corrupt). |
792 void InitializeBackend(bool delete_sync_data_folder); | 792 void InitializeBackend(bool delete_sync_data_folder); |
793 | 793 |
794 // Initializes the various settings from the command line. | 794 // Initializes the various settings from the command line. |
795 void InitSettings(); | 795 void InitSettings(); |
(...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1015 base::Time next_token_request_time_; | 1015 base::Time next_token_request_time_; |
1016 | 1016 |
1017 DISALLOW_COPY_AND_ASSIGN(ProfileSyncService); | 1017 DISALLOW_COPY_AND_ASSIGN(ProfileSyncService); |
1018 }; | 1018 }; |
1019 | 1019 |
1020 bool ShouldShowActionOnUI( | 1020 bool ShouldShowActionOnUI( |
1021 const syncer::SyncProtocolError& error); | 1021 const syncer::SyncProtocolError& error); |
1022 | 1022 |
1023 | 1023 |
1024 #endif // CHROME_BROWSER_SYNC_PROFILE_SYNC_SERVICE_H_ | 1024 #endif // CHROME_BROWSER_SYNC_PROFILE_SYNC_SERVICE_H_ |
OLD | NEW |