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 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 341 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
352 // server to use, and |use_ssl| specifies whether to communicate securely; | 352 // server to use, and |use_ssl| specifies whether to communicate securely; |
353 // the default is false. | 353 // the default is false. |
354 // |blocking_task_runner| is a TaskRunner to be used for tasks that | 354 // |blocking_task_runner| is a TaskRunner to be used for tasks that |
355 // may block on disk I/O. | 355 // may block on disk I/O. |
356 // |post_factory| will be owned internally and used to create | 356 // |post_factory| will be owned internally and used to create |
357 // instances of an HttpPostProvider. | 357 // instances of an HttpPostProvider. |
358 // |model_safe_worker| ownership is given to the SyncManager. | 358 // |model_safe_worker| ownership is given to the SyncManager. |
359 // |user_agent| is a 7-bit ASCII string suitable for use as the User-Agent | 359 // |user_agent| is a 7-bit ASCII string suitable for use as the User-Agent |
360 // HTTP header. Used internally when collecting stats to classify clients. | 360 // HTTP header. Used internally when collecting stats to classify clients. |
361 // |sync_notifier| is owned and used to listen for notifications. | 361 // |sync_notifier| is owned and used to listen for notifications. |
| 362 // |restored_key_for_bootstrapping| is the key used to boostrap the |
| 363 // cryptographer |
| 364 // |keystore_encryption_enabled| determines whether we enable the keystore |
| 365 // encryption functionality in the cryptographer/nigori. |
362 // |report_unrecoverable_error_function| may be NULL. | 366 // |report_unrecoverable_error_function| may be NULL. |
363 // | 367 // |
364 // TODO(akalin): Replace the |post_factory| parameter with a | 368 // TODO(akalin): Replace the |post_factory| parameter with a |
365 // URLFetcher parameter. | 369 // URLFetcher parameter. |
366 virtual bool Init( | 370 virtual bool Init( |
367 const FilePath& database_location, | 371 const FilePath& database_location, |
368 const WeakHandle<JsEventHandler>& event_handler, | 372 const WeakHandle<JsEventHandler>& event_handler, |
369 const std::string& sync_server_and_path, | 373 const std::string& sync_server_and_path, |
370 int sync_server_port, | 374 int sync_server_port, |
371 bool use_ssl, | 375 bool use_ssl, |
372 const scoped_refptr<base::TaskRunner>& blocking_task_runner, | 376 const scoped_refptr<base::TaskRunner>& blocking_task_runner, |
373 scoped_ptr<HttpPostProviderFactory> post_factory, | 377 scoped_ptr<HttpPostProviderFactory> post_factory, |
374 const std::vector<ModelSafeWorker*>& workers, | 378 const std::vector<ModelSafeWorker*>& workers, |
375 ExtensionsActivityMonitor* extensions_activity_monitor, | 379 ExtensionsActivityMonitor* extensions_activity_monitor, |
376 ChangeDelegate* change_delegate, | 380 ChangeDelegate* change_delegate, |
377 const SyncCredentials& credentials, | 381 const SyncCredentials& credentials, |
378 scoped_ptr<SyncNotifier> sync_notifier, | 382 scoped_ptr<SyncNotifier> sync_notifier, |
379 const std::string& restored_key_for_bootstrapping, | 383 const std::string& restored_key_for_bootstrapping, |
| 384 bool keystore_encryption_enabled, |
380 scoped_ptr<InternalComponentsFactory> internal_components_factory, | 385 scoped_ptr<InternalComponentsFactory> internal_components_factory, |
381 Encryptor* encryptor, | 386 Encryptor* encryptor, |
382 UnrecoverableErrorHandler* unrecoverable_error_handler, | 387 UnrecoverableErrorHandler* unrecoverable_error_handler, |
383 ReportUnrecoverableErrorFunction report_unrecoverable_error_function) = 0; | 388 ReportUnrecoverableErrorFunction report_unrecoverable_error_function) = 0; |
384 | 389 |
385 // Throw an unrecoverable error from a transaction (mostly used for | 390 // Throw an unrecoverable error from a transaction (mostly used for |
386 // testing). | 391 // testing). |
387 virtual void ThrowUnrecoverableError() = 0; | 392 virtual void ThrowUnrecoverableError() = 0; |
388 | 393 |
389 virtual ModelTypeSet InitialSyncEndedTypes() = 0; | 394 virtual ModelTypeSet InitialSyncEndedTypes() = 0; |
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
510 virtual bool ReceivedExperiment(Experiments* experiments) = 0; | 515 virtual bool ReceivedExperiment(Experiments* experiments) = 0; |
511 | 516 |
512 // Uses a read-only transaction to determine if the directory being synced has | 517 // Uses a read-only transaction to determine if the directory being synced has |
513 // any remaining unsynced items. May be called on any thread. | 518 // any remaining unsynced items. May be called on any thread. |
514 virtual bool HasUnsyncedItems() = 0; | 519 virtual bool HasUnsyncedItems() = 0; |
515 }; | 520 }; |
516 | 521 |
517 } // namespace syncer | 522 } // namespace syncer |
518 | 523 |
519 #endif // SYNC_INTERNAL_API_PUBLIC_SYNC_MANAGER_H_ | 524 #endif // SYNC_INTERNAL_API_PUBLIC_SYNC_MANAGER_H_ |
OLD | NEW |