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 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
228 // value of false means that it should be OK to ignore this change. | 227 // value of false means that it should be OK to ignore this change. |
229 bool VisiblePropertiesDiffer( | 228 bool VisiblePropertiesDiffer( |
230 const syncable::EntryKernelMutation& mutation, | 229 const syncable::EntryKernelMutation& mutation, |
231 Cryptographer* cryptographer) const; | 230 Cryptographer* cryptographer) const; |
232 | 231 |
233 bool ChangeBuffersAreEmpty(); | 232 bool ChangeBuffersAreEmpty(); |
234 | 233 |
235 // Open the directory named with username_for_share | 234 // Open the directory named with username_for_share |
236 bool OpenDirectory(); | 235 bool OpenDirectory(); |
237 | 236 |
238 // Sign into sync with given credentials. | |
239 // We do not verify the tokens given. After this call, the tokens are set | |
240 // and the sync DB is open. True if successful, false if something | |
241 // went wrong. | |
242 bool SignIn(const SyncCredentials& credentials); | |
243 | |
244 void RequestNudgeForDataTypes( | 237 void RequestNudgeForDataTypes( |
245 const tracked_objects::Location& nudge_location, | 238 const tracked_objects::Location& nudge_location, |
246 ModelTypeSet type); | 239 ModelTypeSet type); |
247 | 240 |
248 void NotifyCryptographerState(Cryptographer* cryptographer); | 241 void NotifyCryptographerState(Cryptographer* cryptographer); |
249 | 242 |
250 // If this is a deletion for a password, sets the legacy | 243 // If this is a deletion for a password, sets the legacy |
251 // ExtraPasswordChangeRecordData field of |buffer|. Otherwise sets | 244 // ExtraPasswordChangeRecordData field of |buffer|. Otherwise sets |
252 // |buffer|'s specifics field to contain the unencrypted data. | 245 // |buffer|'s specifics field to contain the unencrypted data. |
253 void SetExtraChangeRecordData(int64 id, | 246 void SetExtraChangeRecordData(int64 id, |
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
415 // conflict resolver) updated the nigori's encryption keys in this chrome | 408 // conflict resolver) updated the nigori's encryption keys in this chrome |
416 // instantiation. | 409 // instantiation. |
417 int nigori_overwrite_count_; | 410 int nigori_overwrite_count_; |
418 | 411 |
419 DISALLOW_COPY_AND_ASSIGN(SyncManagerImpl); | 412 DISALLOW_COPY_AND_ASSIGN(SyncManagerImpl); |
420 }; | 413 }; |
421 | 414 |
422 } // namespace syncer | 415 } // namespace syncer |
423 | 416 |
424 #endif // SYNC_INTERNAL_API_SYNC_MANAGER_H_ | 417 #endif // SYNC_INTERNAL_API_SYNC_MANAGER_H_ |
OLD | NEW |