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 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
58 | 58 |
59 // SyncManager implementation. | 59 // SyncManager implementation. |
60 virtual bool Init( | 60 virtual bool Init( |
61 const FilePath& database_location, | 61 const FilePath& database_location, |
62 const WeakHandle<JsEventHandler>& event_handler, | 62 const WeakHandle<JsEventHandler>& event_handler, |
63 const std::string& sync_server_and_path, | 63 const std::string& sync_server_and_path, |
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 ModelSafeRoutingInfo& model_safe_routing_info, | |
69 const std::vector<ModelSafeWorker*>& workers, | 68 const std::vector<ModelSafeWorker*>& workers, |
70 ExtensionsActivityMonitor* extensions_activity_monitor, | 69 ExtensionsActivityMonitor* extensions_activity_monitor, |
71 SyncManager::ChangeDelegate* change_delegate, | 70 SyncManager::ChangeDelegate* change_delegate, |
72 const SyncCredentials& credentials, | 71 const SyncCredentials& credentials, |
73 scoped_ptr<SyncNotifier> sync_notifier, | 72 scoped_ptr<SyncNotifier> sync_notifier, |
74 const std::string& restored_key_for_bootstrapping, | 73 const std::string& restored_key_for_bootstrapping, |
75 scoped_ptr<InternalComponentsFactory> internal_components_factory, | 74 scoped_ptr<InternalComponentsFactory> internal_components_factory, |
76 Encryptor* encryptor, | 75 Encryptor* encryptor, |
77 UnrecoverableErrorHandler* unrecoverable_error_handler, | 76 UnrecoverableErrorHandler* unrecoverable_error_handler, |
78 ReportUnrecoverableErrorFunction | 77 ReportUnrecoverableErrorFunction |
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
214 // value of false means that it should be OK to ignore this change. | 213 // value of false means that it should be OK to ignore this change. |
215 bool VisiblePropertiesDiffer( | 214 bool VisiblePropertiesDiffer( |
216 const syncable::EntryKernelMutation& mutation, | 215 const syncable::EntryKernelMutation& mutation, |
217 Cryptographer* cryptographer) const; | 216 Cryptographer* cryptographer) const; |
218 | 217 |
219 bool ChangeBuffersAreEmpty(); | 218 bool ChangeBuffersAreEmpty(); |
220 | 219 |
221 // Open the directory named with username_for_share | 220 // Open the directory named with username_for_share |
222 bool OpenDirectory(); | 221 bool OpenDirectory(); |
223 | 222 |
224 // Sign into sync with given credentials. | 223 // Purge those types from |previously_enabled_types| that are no longer |
225 // We do not verify the tokens given. After this call, the tokens are set | 224 // enabled in |currently_enabled_types|. |
226 // and the sync DB is open. True if successful, false if something | 225 bool PurgeDisabledTypes(ModelTypeSet previously_enabled_types, |
227 // went wrong. | 226 ModelTypeSet currently_enabled_types); |
228 bool SignIn(const SyncCredentials& credentials); | |
229 | 227 |
230 void RequestNudgeForDataTypes( | 228 void RequestNudgeForDataTypes( |
231 const tracked_objects::Location& nudge_location, | 229 const tracked_objects::Location& nudge_location, |
232 ModelTypeSet type); | 230 ModelTypeSet type); |
233 | 231 |
234 void NotifyCryptographerState(Cryptographer* cryptographer); | 232 void NotifyCryptographerState(Cryptographer* cryptographer); |
235 | 233 |
236 // If this is a deletion for a password, sets the legacy | 234 // If this is a deletion for a password, sets the legacy |
237 // ExtraPasswordChangeRecordData field of |buffer|. Otherwise sets | 235 // ExtraPasswordChangeRecordData field of |buffer|. Otherwise sets |
238 // |buffer|'s specifics field to contain the unencrypted data. | 236 // |buffer|'s specifics field to contain the unencrypted data. |
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
401 // conflict resolver) updated the nigori's encryption keys in this chrome | 399 // conflict resolver) updated the nigori's encryption keys in this chrome |
402 // instantiation. | 400 // instantiation. |
403 int nigori_overwrite_count_; | 401 int nigori_overwrite_count_; |
404 | 402 |
405 DISALLOW_COPY_AND_ASSIGN(SyncManagerImpl); | 403 DISALLOW_COPY_AND_ASSIGN(SyncManagerImpl); |
406 }; | 404 }; |
407 | 405 |
408 } // namespace syncer | 406 } // namespace syncer |
409 | 407 |
410 #endif // SYNC_INTERNAL_API_SYNC_MANAGER_H_ | 408 #endif // SYNC_INTERNAL_API_SYNC_MANAGER_H_ |
OLD | NEW |