OLD | NEW |
1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 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 274 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
285 // chrome://sync-internals. |event_handler| may be uninitialized. | 285 // chrome://sync-internals. |event_handler| may be uninitialized. |
286 // |sync_server_and_path| and |sync_server_port| represent the Chrome sync | 286 // |sync_server_and_path| and |sync_server_port| represent the Chrome sync |
287 // server to use, and |use_ssl| specifies whether to communicate securely; | 287 // server to use, and |use_ssl| specifies whether to communicate securely; |
288 // the default is false. | 288 // the default is false. |
289 // |post_factory| will be owned internally and used to create | 289 // |post_factory| will be owned internally and used to create |
290 // instances of an HttpPostProvider. | 290 // instances of an HttpPostProvider. |
291 // |model_safe_worker| ownership is given to the SyncManager. | 291 // |model_safe_worker| ownership is given to the SyncManager. |
292 // |user_agent| is a 7-bit ASCII string suitable for use as the User-Agent | 292 // |user_agent| is a 7-bit ASCII string suitable for use as the User-Agent |
293 // HTTP header. Used internally when collecting stats to classify clients. | 293 // HTTP header. Used internally when collecting stats to classify clients. |
294 // |invalidator| is owned and used to listen for invalidations. | 294 // |invalidator| is owned and used to listen for invalidations. |
| 295 // |invalidator_client_id| is used to unqiuely identify this client to the |
| 296 // invalidation notification server. |
295 // |restored_key_for_bootstrapping| is the key used to boostrap the | 297 // |restored_key_for_bootstrapping| is the key used to boostrap the |
296 // cryptographer | 298 // cryptographer |
297 // |keystore_encryption_enabled| determines whether we enable the keystore | 299 // |keystore_encryption_enabled| determines whether we enable the keystore |
298 // encryption functionality in the cryptographer/nigori. | 300 // encryption functionality in the cryptographer/nigori. |
299 // |report_unrecoverable_error_function| may be NULL. | 301 // |report_unrecoverable_error_function| may be NULL. |
300 // | 302 // |
301 // TODO(akalin): Replace the |post_factory| parameter with a | 303 // TODO(akalin): Replace the |post_factory| parameter with a |
302 // URLFetcher parameter. | 304 // URLFetcher parameter. |
303 virtual void Init( | 305 virtual void Init( |
304 const FilePath& database_location, | 306 const FilePath& database_location, |
305 const WeakHandle<JsEventHandler>& event_handler, | 307 const WeakHandle<JsEventHandler>& event_handler, |
306 const std::string& sync_server_and_path, | 308 const std::string& sync_server_and_path, |
307 int sync_server_port, | 309 int sync_server_port, |
308 bool use_ssl, | 310 bool use_ssl, |
309 scoped_ptr<HttpPostProviderFactory> post_factory, | 311 scoped_ptr<HttpPostProviderFactory> post_factory, |
310 const std::vector<ModelSafeWorker*>& workers, | 312 const std::vector<ModelSafeWorker*>& workers, |
311 ExtensionsActivityMonitor* extensions_activity_monitor, | 313 ExtensionsActivityMonitor* extensions_activity_monitor, |
312 ChangeDelegate* change_delegate, | 314 ChangeDelegate* change_delegate, |
313 const SyncCredentials& credentials, | 315 const SyncCredentials& credentials, |
314 scoped_ptr<Invalidator> invalidator, | 316 scoped_ptr<Invalidator> invalidator, |
| 317 const std::string& invalidator_client_id, |
315 const std::string& restored_key_for_bootstrapping, | 318 const std::string& restored_key_for_bootstrapping, |
316 const std::string& restored_keystore_key_for_bootstrapping, | 319 const std::string& restored_keystore_key_for_bootstrapping, |
317 scoped_ptr<InternalComponentsFactory> internal_components_factory, | 320 scoped_ptr<InternalComponentsFactory> internal_components_factory, |
318 Encryptor* encryptor, | 321 Encryptor* encryptor, |
319 UnrecoverableErrorHandler* unrecoverable_error_handler, | 322 UnrecoverableErrorHandler* unrecoverable_error_handler, |
320 ReportUnrecoverableErrorFunction report_unrecoverable_error_function) = 0; | 323 ReportUnrecoverableErrorFunction report_unrecoverable_error_function) = 0; |
321 | 324 |
322 // Throw an unrecoverable error from a transaction (mostly used for | 325 // Throw an unrecoverable error from a transaction (mostly used for |
323 // testing). | 326 // testing). |
324 virtual void ThrowUnrecoverableError() = 0; | 327 virtual void ThrowUnrecoverableError() = 0; |
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
427 // Returns the SyncManager's encryption handler. | 430 // Returns the SyncManager's encryption handler. |
428 virtual SyncEncryptionHandler* GetEncryptionHandler() = 0; | 431 virtual SyncEncryptionHandler* GetEncryptionHandler() = 0; |
429 | 432 |
430 // Ask the SyncManager to fetch updates for the given types. | 433 // Ask the SyncManager to fetch updates for the given types. |
431 virtual void RefreshTypes(ModelTypeSet types) = 0; | 434 virtual void RefreshTypes(ModelTypeSet types) = 0; |
432 }; | 435 }; |
433 | 436 |
434 } // namespace syncer | 437 } // namespace syncer |
435 | 438 |
436 #endif // SYNC_INTERNAL_API_PUBLIC_SYNC_MANAGER_H_ | 439 #endif // SYNC_INTERNAL_API_PUBLIC_SYNC_MANAGER_H_ |
OLD | NEW |