OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_GLUE_SYNC_BACKEND_HOST_IMPL_H_ | 5 #ifndef CHROME_BROWSER_SYNC_GLUE_SYNC_BACKEND_HOST_IMPL_H_ |
6 #define CHROME_BROWSER_SYNC_GLUE_SYNC_BACKEND_HOST_IMPL_H_ | 6 #define CHROME_BROWSER_SYNC_GLUE_SYNC_BACKEND_HOST_IMPL_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
83 sync_driver::SyncFrontend* frontend, | 83 sync_driver::SyncFrontend* frontend, |
84 scoped_ptr<base::Thread> sync_thread, | 84 scoped_ptr<base::Thread> sync_thread, |
85 const syncer::WeakHandle<syncer::JsEventHandler>& event_handler, | 85 const syncer::WeakHandle<syncer::JsEventHandler>& event_handler, |
86 const GURL& service_url, | 86 const GURL& service_url, |
87 const syncer::SyncCredentials& credentials, | 87 const syncer::SyncCredentials& credentials, |
88 bool delete_sync_data_folder, | 88 bool delete_sync_data_folder, |
89 scoped_ptr<syncer::SyncManagerFactory> sync_manager_factory, | 89 scoped_ptr<syncer::SyncManagerFactory> sync_manager_factory, |
90 scoped_ptr<syncer::UnrecoverableErrorHandler> unrecoverable_error_handler, | 90 scoped_ptr<syncer::UnrecoverableErrorHandler> unrecoverable_error_handler, |
91 syncer::ReportUnrecoverableErrorFunction | 91 syncer::ReportUnrecoverableErrorFunction |
92 report_unrecoverable_error_function, | 92 report_unrecoverable_error_function, |
93 syncer::NetworkResources* network_resources) OVERRIDE; | 93 syncer::NetworkResources* network_resources) override; |
94 virtual void UpdateCredentials( | 94 virtual void UpdateCredentials( |
95 const syncer::SyncCredentials& credentials) OVERRIDE; | 95 const syncer::SyncCredentials& credentials) override; |
96 virtual void StartSyncingWithServer() OVERRIDE; | 96 virtual void StartSyncingWithServer() override; |
97 virtual void SetEncryptionPassphrase( | 97 virtual void SetEncryptionPassphrase( |
98 const std::string& passphrase, | 98 const std::string& passphrase, |
99 bool is_explicit) OVERRIDE; | 99 bool is_explicit) override; |
100 virtual bool SetDecryptionPassphrase(const std::string& passphrase) | 100 virtual bool SetDecryptionPassphrase(const std::string& passphrase) |
101 OVERRIDE WARN_UNUSED_RESULT; | 101 override WARN_UNUSED_RESULT; |
102 virtual void StopSyncingForShutdown() OVERRIDE; | 102 virtual void StopSyncingForShutdown() override; |
103 virtual scoped_ptr<base::Thread> Shutdown(syncer::ShutdownReason reason) | 103 virtual scoped_ptr<base::Thread> Shutdown(syncer::ShutdownReason reason) |
104 OVERRIDE; | 104 override; |
105 virtual void UnregisterInvalidationIds() OVERRIDE; | 105 virtual void UnregisterInvalidationIds() override; |
106 virtual void ConfigureDataTypes( | 106 virtual void ConfigureDataTypes( |
107 syncer::ConfigureReason reason, | 107 syncer::ConfigureReason reason, |
108 const DataTypeConfigStateMap& config_state_map, | 108 const DataTypeConfigStateMap& config_state_map, |
109 const base::Callback<void(syncer::ModelTypeSet, | 109 const base::Callback<void(syncer::ModelTypeSet, |
110 syncer::ModelTypeSet)>& ready_task, | 110 syncer::ModelTypeSet)>& ready_task, |
111 const base::Callback<void()>& retry_callback) OVERRIDE; | 111 const base::Callback<void()>& retry_callback) override; |
112 virtual void ActivateDataType( | 112 virtual void ActivateDataType( |
113 syncer::ModelType type, syncer::ModelSafeGroup group, | 113 syncer::ModelType type, syncer::ModelSafeGroup group, |
114 sync_driver::ChangeProcessor* change_processor) OVERRIDE; | 114 sync_driver::ChangeProcessor* change_processor) override; |
115 virtual void DeactivateDataType(syncer::ModelType type) OVERRIDE; | 115 virtual void DeactivateDataType(syncer::ModelType type) override; |
116 virtual void EnableEncryptEverything() OVERRIDE; | 116 virtual void EnableEncryptEverything() override; |
117 virtual syncer::UserShare* GetUserShare() const OVERRIDE; | 117 virtual syncer::UserShare* GetUserShare() const override; |
118 virtual scoped_ptr<syncer::SyncContextProxy> GetSyncContextProxy() OVERRIDE; | 118 virtual scoped_ptr<syncer::SyncContextProxy> GetSyncContextProxy() override; |
119 virtual Status GetDetailedStatus() OVERRIDE; | 119 virtual Status GetDetailedStatus() override; |
120 virtual syncer::sessions::SyncSessionSnapshot | 120 virtual syncer::sessions::SyncSessionSnapshot |
121 GetLastSessionSnapshot() const OVERRIDE; | 121 GetLastSessionSnapshot() const override; |
122 virtual bool HasUnsyncedItems() const OVERRIDE; | 122 virtual bool HasUnsyncedItems() const override; |
123 virtual bool IsNigoriEnabled() const OVERRIDE; | 123 virtual bool IsNigoriEnabled() const override; |
124 virtual syncer::PassphraseType GetPassphraseType() const OVERRIDE; | 124 virtual syncer::PassphraseType GetPassphraseType() const override; |
125 virtual base::Time GetExplicitPassphraseTime() const OVERRIDE; | 125 virtual base::Time GetExplicitPassphraseTime() const override; |
126 virtual bool IsCryptographerReady( | 126 virtual bool IsCryptographerReady( |
127 const syncer::BaseTransaction* trans) const OVERRIDE; | 127 const syncer::BaseTransaction* trans) const override; |
128 virtual void GetModelSafeRoutingInfo( | 128 virtual void GetModelSafeRoutingInfo( |
129 syncer::ModelSafeRoutingInfo* out) const OVERRIDE; | 129 syncer::ModelSafeRoutingInfo* out) const override; |
130 virtual void FlushDirectory() const OVERRIDE; | 130 virtual void FlushDirectory() const override; |
131 virtual void RequestBufferedProtocolEventsAndEnableForwarding() OVERRIDE; | 131 virtual void RequestBufferedProtocolEventsAndEnableForwarding() override; |
132 virtual void DisableProtocolEventForwarding() OVERRIDE; | 132 virtual void DisableProtocolEventForwarding() override; |
133 virtual void EnableDirectoryTypeDebugInfoForwarding() OVERRIDE; | 133 virtual void EnableDirectoryTypeDebugInfoForwarding() override; |
134 virtual void DisableDirectoryTypeDebugInfoForwarding() OVERRIDE; | 134 virtual void DisableDirectoryTypeDebugInfoForwarding() override; |
135 virtual void GetAllNodesForTypes( | 135 virtual void GetAllNodesForTypes( |
136 syncer::ModelTypeSet types, | 136 syncer::ModelTypeSet types, |
137 base::Callback<void(const std::vector<syncer::ModelType>&, | 137 base::Callback<void(const std::vector<syncer::ModelType>&, |
138 ScopedVector<base::ListValue>)> type) OVERRIDE; | 138 ScopedVector<base::ListValue>)> type) override; |
139 virtual base::MessageLoop* GetSyncLoopForTesting() OVERRIDE; | 139 virtual base::MessageLoop* GetSyncLoopForTesting() override; |
140 | 140 |
141 protected: | 141 protected: |
142 // The types and functions below are protected so that test | 142 // The types and functions below are protected so that test |
143 // subclasses can use them. | 143 // subclasses can use them. |
144 | 144 |
145 // Allows tests to perform alternate core initialization work. | 145 // Allows tests to perform alternate core initialization work. |
146 virtual void InitCore(scoped_ptr<DoInitializeOptions> options); | 146 virtual void InitCore(scoped_ptr<DoInitializeOptions> options); |
147 | 147 |
148 // Request the syncer to reconfigure with the specfied params. | 148 // Request the syncer to reconfigure with the specfied params. |
149 // Virtual for testing. | 149 // Virtual for testing. |
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
288 | 288 |
289 // Dispatched to from OnConnectionStatusChange to handle updating | 289 // Dispatched to from OnConnectionStatusChange to handle updating |
290 // frontend UI components. | 290 // frontend UI components. |
291 void HandleConnectionStatusChangeOnFrontendLoop( | 291 void HandleConnectionStatusChangeOnFrontendLoop( |
292 syncer::ConnectionStatus status); | 292 syncer::ConnectionStatus status); |
293 | 293 |
294 // NotificationObserver implementation. | 294 // NotificationObserver implementation. |
295 virtual void Observe( | 295 virtual void Observe( |
296 int type, | 296 int type, |
297 const content::NotificationSource& source, | 297 const content::NotificationSource& source, |
298 const content::NotificationDetails& details) OVERRIDE; | 298 const content::NotificationDetails& details) override; |
299 | 299 |
300 // InvalidationHandler implementation. | 300 // InvalidationHandler implementation. |
301 virtual void OnInvalidatorStateChange( | 301 virtual void OnInvalidatorStateChange( |
302 syncer::InvalidatorState state) OVERRIDE; | 302 syncer::InvalidatorState state) override; |
303 virtual void OnIncomingInvalidation( | 303 virtual void OnIncomingInvalidation( |
304 const syncer::ObjectIdInvalidationMap& invalidation_map) OVERRIDE; | 304 const syncer::ObjectIdInvalidationMap& invalidation_map) override; |
305 virtual std::string GetOwnerName() const OVERRIDE; | 305 virtual std::string GetOwnerName() const override; |
306 | 306 |
307 content::NotificationRegistrar notification_registrar_; | 307 content::NotificationRegistrar notification_registrar_; |
308 | 308 |
309 // A reference to the MessageLoop used to construct |this|, so we know how | 309 // A reference to the MessageLoop used to construct |this|, so we know how |
310 // to safely talk back to the SyncFrontend. | 310 // to safely talk back to the SyncFrontend. |
311 base::MessageLoop* const frontend_loop_; | 311 base::MessageLoop* const frontend_loop_; |
312 | 312 |
313 Profile* const profile_; | 313 Profile* const profile_; |
314 | 314 |
315 // Name used for debugging (set from profile_->GetDebugName()). | 315 // Name used for debugging (set from profile_->GetDebugName()). |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
362 | 362 |
363 base::WeakPtrFactory<SyncBackendHostImpl> weak_ptr_factory_; | 363 base::WeakPtrFactory<SyncBackendHostImpl> weak_ptr_factory_; |
364 | 364 |
365 DISALLOW_COPY_AND_ASSIGN(SyncBackendHostImpl); | 365 DISALLOW_COPY_AND_ASSIGN(SyncBackendHostImpl); |
366 }; | 366 }; |
367 | 367 |
368 } // namespace browser_sync | 368 } // namespace browser_sync |
369 | 369 |
370 #endif // CHROME_BROWSER_SYNC_GLUE_SYNC_BACKEND_HOST_IMPL_H_ | 370 #endif // CHROME_BROWSER_SYNC_GLUE_SYNC_BACKEND_HOST_IMPL_H_ |
371 | 371 |
OLD | NEW |