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 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
64 class OpenTabsUIDelegate; | 64 class OpenTabsUIDelegate; |
65 class SessionModelAssociator; | 65 class SessionModelAssociator; |
66 | 66 |
67 namespace sessions { | 67 namespace sessions { |
68 class SyncSessionSnapshot; | 68 class SyncSessionSnapshot; |
69 } // namespace sessions | 69 } // namespace sessions |
70 } // namespace browser_sync | 70 } // namespace browser_sync |
71 | 71 |
72 namespace syncer { | 72 namespace syncer { |
73 class BaseTransaction; | 73 class BaseTransaction; |
| 74 class HttpPostProviderFactoryFactory; |
74 struct SyncCredentials; | 75 struct SyncCredentials; |
75 struct UserShare; | 76 struct UserShare; |
76 } // namespace syncer | 77 } // namespace syncer |
77 | 78 |
78 namespace sync_pb { | 79 namespace sync_pb { |
79 class EncryptedData; | 80 class EncryptedData; |
80 } // namespace sync_pb | 81 } // namespace sync_pb |
81 | 82 |
82 using browser_sync::SessionsSyncManager; | 83 using browser_sync::SessionsSyncManager; |
83 | 84 |
(...skipping 608 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
692 // ASAP, presumably because a local change event has occurred but we're | 693 // ASAP, presumably because a local change event has occurred but we're |
693 // still in deferred start mode, meaning the SyncableService hasn't been | 694 // still in deferred start mode, meaning the SyncableService hasn't been |
694 // told to MergeDataAndStartSyncing yet. | 695 // told to MergeDataAndStartSyncing yet. |
695 void OnDataTypeRequestsSyncStartup(syncer::ModelType type); | 696 void OnDataTypeRequestsSyncStartup(syncer::ModelType type); |
696 | 697 |
697 // Return sync token status. | 698 // Return sync token status. |
698 SyncTokenStatus GetSyncTokenStatus() const; | 699 SyncTokenStatus GetSyncTokenStatus() const; |
699 | 700 |
700 browser_sync::FaviconCache* GetFaviconCache(); | 701 browser_sync::FaviconCache* GetFaviconCache(); |
701 | 702 |
| 703 // Overrides the HttpPostProviderFactoryFactory used for Sync connections. |
| 704 void OverrideHttpPostProviderFactoryFactoryForTest( |
| 705 syncer::HttpPostProviderFactoryFactory* |
| 706 http_post_provider_factory_factory); |
| 707 |
702 protected: | 708 protected: |
703 // Used by test classes that derive from ProfileSyncService. | 709 // Used by test classes that derive from ProfileSyncService. |
704 virtual browser_sync::SyncBackendHost* GetBackendForTest(); | 710 virtual browser_sync::SyncBackendHost* GetBackendForTest(); |
705 | 711 |
706 // Helper to configure the priority data types. | 712 // Helper to configure the priority data types. |
707 void ConfigurePriorityDataTypes(); | 713 void ConfigurePriorityDataTypes(); |
708 | 714 |
709 // Helper to install and configure a data type manager. | 715 // Helper to install and configure a data type manager. |
710 void ConfigureDataTypeManager(); | 716 void ConfigureDataTypeManager(); |
711 | 717 |
(...skipping 321 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1033 // States related to sync token and connection. | 1039 // States related to sync token and connection. |
1034 base::Time connection_status_update_time_; | 1040 base::Time connection_status_update_time_; |
1035 syncer::ConnectionStatus connection_status_; | 1041 syncer::ConnectionStatus connection_status_; |
1036 base::Time token_request_time_; | 1042 base::Time token_request_time_; |
1037 base::Time token_receive_time_; | 1043 base::Time token_receive_time_; |
1038 GoogleServiceAuthError last_get_token_error_; | 1044 GoogleServiceAuthError last_get_token_error_; |
1039 base::Time next_token_request_time_; | 1045 base::Time next_token_request_time_; |
1040 | 1046 |
1041 scoped_ptr<SessionsSyncManager> sessions_sync_manager_; | 1047 scoped_ptr<SessionsSyncManager> sessions_sync_manager_; |
1042 | 1048 |
| 1049 syncer::HttpPostProviderFactoryFactory* http_post_provider_factory_factory_; |
| 1050 |
1043 DISALLOW_COPY_AND_ASSIGN(ProfileSyncService); | 1051 DISALLOW_COPY_AND_ASSIGN(ProfileSyncService); |
1044 }; | 1052 }; |
1045 | 1053 |
1046 bool ShouldShowActionOnUI( | 1054 bool ShouldShowActionOnUI( |
1047 const syncer::SyncProtocolError& error); | 1055 const syncer::SyncProtocolError& error); |
1048 | 1056 |
1049 | 1057 |
1050 #endif // CHROME_BROWSER_SYNC_PROFILE_SYNC_SERVICE_H_ | 1058 #endif // CHROME_BROWSER_SYNC_PROFILE_SYNC_SERVICE_H_ |
OLD | NEW |