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_SYNC_MANAGER_H_ | 5 #ifndef SYNC_INTERNAL_API_SYNC_MANAGER_H_ |
6 #define SYNC_INTERNAL_API_SYNC_MANAGER_H_ | 6 #define SYNC_INTERNAL_API_SYNC_MANAGER_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
64 int sync_server_port, | 64 int sync_server_port, |
65 bool use_ssl, | 65 bool use_ssl, |
66 const scoped_refptr<base::TaskRunner>& blocking_task_runner, | 66 const scoped_refptr<base::TaskRunner>& blocking_task_runner, |
67 scoped_ptr<HttpPostProviderFactory> post_factory, | 67 scoped_ptr<HttpPostProviderFactory> post_factory, |
68 const std::vector<ModelSafeWorker*>& workers, | 68 const std::vector<ModelSafeWorker*>& workers, |
69 ExtensionsActivityMonitor* extensions_activity_monitor, | 69 ExtensionsActivityMonitor* extensions_activity_monitor, |
70 SyncManager::ChangeDelegate* change_delegate, | 70 SyncManager::ChangeDelegate* change_delegate, |
71 const SyncCredentials& credentials, | 71 const SyncCredentials& credentials, |
72 scoped_ptr<SyncNotifier> sync_notifier, | 72 scoped_ptr<SyncNotifier> sync_notifier, |
73 const std::string& restored_key_for_bootstrapping, | 73 const std::string& restored_key_for_bootstrapping, |
| 74 const std::string& restored_keystore_key_for_bootstrapping, |
74 bool keystore_encryption_enabled, | 75 bool keystore_encryption_enabled, |
75 scoped_ptr<InternalComponentsFactory> internal_components_factory, | 76 scoped_ptr<InternalComponentsFactory> internal_components_factory, |
76 Encryptor* encryptor, | 77 Encryptor* encryptor, |
77 UnrecoverableErrorHandler* unrecoverable_error_handler, | 78 UnrecoverableErrorHandler* unrecoverable_error_handler, |
78 ReportUnrecoverableErrorFunction | 79 ReportUnrecoverableErrorFunction |
79 report_unrecoverable_error_function) OVERRIDE; | 80 report_unrecoverable_error_function) OVERRIDE; |
80 virtual void ThrowUnrecoverableError() OVERRIDE; | 81 virtual void ThrowUnrecoverableError() OVERRIDE; |
81 virtual ModelTypeSet InitialSyncEndedTypes() OVERRIDE; | 82 virtual ModelTypeSet InitialSyncEndedTypes() OVERRIDE; |
82 virtual ModelTypeSet GetTypesWithEmptyProgressMarkerToken( | 83 virtual ModelTypeSet GetTypesWithEmptyProgressMarkerToken( |
83 ModelTypeSet types) OVERRIDE; | 84 ModelTypeSet types) OVERRIDE; |
84 virtual bool PurgePartiallySyncedTypes() OVERRIDE; | 85 virtual bool PurgePartiallySyncedTypes() OVERRIDE; |
85 virtual void UpdateCredentials(const SyncCredentials& credentials) OVERRIDE; | 86 virtual void UpdateCredentials(const SyncCredentials& credentials) OVERRIDE; |
86 virtual void UpdateEnabledTypes( | 87 virtual void UpdateEnabledTypes( |
87 const ModelTypeSet& enabled_types) OVERRIDE; | 88 const ModelTypeSet& enabled_types) OVERRIDE; |
88 virtual void StartSyncingNormally( | 89 virtual void StartSyncingNormally( |
89 const ModelSafeRoutingInfo& routing_info) OVERRIDE; | 90 const ModelSafeRoutingInfo& routing_info) OVERRIDE; |
90 virtual void SetEncryptionPassphrase(const std::string& passphrase, | 91 virtual void SetEncryptionPassphrase(const std::string& passphrase, |
91 bool is_explicit) OVERRIDE; | 92 bool is_explicit) OVERRIDE; |
92 virtual void SetDecryptionPassphrase(const std::string& passphrase) OVERRIDE; | 93 virtual void SetDecryptionPassphrase(const std::string& passphrase) OVERRIDE; |
93 virtual void ConfigureSyncer( | 94 virtual void ConfigureSyncer( |
94 ConfigureReason reason, | 95 ConfigureReason reason, |
95 const ModelTypeSet& types_to_config, | 96 const ModelTypeSet& types_to_config, |
96 const ModelSafeRoutingInfo& new_routing_info, | 97 const ModelSafeRoutingInfo& new_routing_info, |
97 const base::Closure& ready_task, | 98 const base::Closure& ready_task, |
98 const base::Closure& retry_task) OVERRIDE; | 99 const base::Closure& retry_task) OVERRIDE; |
99 virtual void AddObserver(SyncManager::Observer* observer) OVERRIDE; | 100 virtual void AddObserver(SyncManager::Observer* observer) OVERRIDE; |
100 virtual void RemoveObserver(SyncManager::Observer* observer) OVERRIDE; | 101 virtual void RemoveObserver(SyncManager::Observer* observer) OVERRIDE; |
101 virtual SyncStatus GetDetailedStatus() const OVERRIDE; | 102 virtual SyncStatus GetDetailedStatus() const OVERRIDE; |
102 virtual bool IsUsingExplicitPassphrase() OVERRIDE; | 103 virtual bool IsUsingExplicitPassphrase() OVERRIDE; |
| 104 virtual bool GetKeystoreKeyBootstrapToken(std::string* token) OVERRIDE; |
103 virtual void SaveChanges() OVERRIDE; | 105 virtual void SaveChanges() OVERRIDE; |
104 virtual void StopSyncingForShutdown(const base::Closure& callback) OVERRIDE; | 106 virtual void StopSyncingForShutdown(const base::Closure& callback) OVERRIDE; |
105 virtual void ShutdownOnSyncThread() OVERRIDE; | 107 virtual void ShutdownOnSyncThread() OVERRIDE; |
106 virtual UserShare* GetUserShare() OVERRIDE; | 108 virtual UserShare* GetUserShare() OVERRIDE; |
107 | 109 |
108 // Update the Cryptographer from the current nigori node and write back any | 110 // Update the Cryptographer from the current nigori node and write back any |
109 // necessary changes to the nigori node. We also detect missing encryption | 111 // necessary changes to the nigori node. We also detect missing encryption |
110 // keys and write them into the nigori node. | 112 // keys and write them into the nigori node. |
111 // Also updates or adds the device information into the nigori node. | 113 // Also updates or adds the device information into the nigori node. |
112 // Note: opens a transaction and can trigger an ON_PASSPHRASE_REQUIRED, so | 114 // Note: opens a transaction and can trigger an ON_PASSPHRASE_REQUIRED, so |
(...skipping 288 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
401 // conflict resolver) updated the nigori's encryption keys in this chrome | 403 // conflict resolver) updated the nigori's encryption keys in this chrome |
402 // instantiation. | 404 // instantiation. |
403 int nigori_overwrite_count_; | 405 int nigori_overwrite_count_; |
404 | 406 |
405 DISALLOW_COPY_AND_ASSIGN(SyncManagerImpl); | 407 DISALLOW_COPY_AND_ASSIGN(SyncManagerImpl); |
406 }; | 408 }; |
407 | 409 |
408 } // namespace syncer | 410 } // namespace syncer |
409 | 411 |
410 #endif // SYNC_INTERNAL_API_SYNC_MANAGER_H_ | 412 #endif // SYNC_INTERNAL_API_SYNC_MANAGER_H_ |
OLD | NEW |