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 279 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
290 * Gets child ids for a given id. | 290 * Gets child ids for a given id. |
291 * | 291 * |
292 * @param {string} id 64-bit id in decimal string form of the parent | 292 * @param {string} id 64-bit id in decimal string form of the parent |
293 * node. | 293 * node. |
294 * @param {Array.<string>} callback Called with the (possibly empty) | 294 * @param {Array.<string>} callback Called with the (possibly empty) |
295 * list of child ids. | 295 * list of child ids. |
296 */ | 296 */ |
297 // function getChildNodeIds(id); | 297 // function getChildNodeIds(id); |
298 | 298 |
299 virtual void OnInitializationComplete( | 299 virtual void OnInitializationComplete( |
300 const syncer::WeakHandle<syncer::JsBackend>& | 300 const syncer::WeakHandle<syncer::JsBackend>& js_backend, |
301 js_backend, bool success) = 0; | 301 bool success, syncer::ModelTypeSet restored_types) = 0; |
Nicolas Zea
2012/07/20 21:35:39
nit: prefer having last arg on separate line
rlarocque
2012/07/20 23:20:05
Done.
| |
302 | 302 |
303 // We are no longer permitted to communicate with the server. Sync should | 303 // We are no longer permitted to communicate with the server. Sync should |
304 // be disabled and state cleaned up at once. This can happen for a number | 304 // be disabled and state cleaned up at once. This can happen for a number |
305 // of reasons, e.g. swapping from a test instance to production, or a | 305 // of reasons, e.g. swapping from a test instance to production, or a |
306 // global stop syncing operation has wiped the store. | 306 // global stop syncing operation has wiped the store. |
307 virtual void OnStopSyncingPermanently() = 0; | 307 virtual void OnStopSyncingPermanently() = 0; |
308 | 308 |
309 // Called when the set of encrypted types or the encrypt | 309 // Called when the set of encrypted types or the encrypt |
310 // everything flag has been changed. Note that encryption isn't | 310 // everything flag has been changed. Note that encryption isn't |
311 // complete until the OnEncryptionComplete() notification has been | 311 // complete until the OnEncryptionComplete() notification has been |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
368 // TODO(akalin): Replace the |post_factory| parameter with a | 368 // TODO(akalin): Replace the |post_factory| parameter with a |
369 // URLFetcher parameter. | 369 // URLFetcher parameter. |
370 virtual bool Init( | 370 virtual bool Init( |
371 const FilePath& database_location, | 371 const FilePath& database_location, |
372 const syncer::WeakHandle<syncer::JsEventHandler>& event_handler, | 372 const syncer::WeakHandle<syncer::JsEventHandler>& event_handler, |
373 const std::string& sync_server_and_path, | 373 const std::string& sync_server_and_path, |
374 int sync_server_port, | 374 int sync_server_port, |
375 bool use_ssl, | 375 bool use_ssl, |
376 const scoped_refptr<base::TaskRunner>& blocking_task_runner, | 376 const scoped_refptr<base::TaskRunner>& blocking_task_runner, |
377 scoped_ptr<HttpPostProviderFactory> post_factory, | 377 scoped_ptr<HttpPostProviderFactory> post_factory, |
378 const syncer::ModelSafeRoutingInfo& model_safe_routing_info, | |
379 const std::vector<syncer::ModelSafeWorker*>& workers, | 378 const std::vector<syncer::ModelSafeWorker*>& workers, |
380 syncer::ExtensionsActivityMonitor* extensions_activity_monitor, | 379 syncer::ExtensionsActivityMonitor* extensions_activity_monitor, |
381 ChangeDelegate* change_delegate, | 380 ChangeDelegate* change_delegate, |
382 const SyncCredentials& credentials, | 381 const SyncCredentials& credentials, |
383 scoped_ptr<syncer::SyncNotifier> sync_notifier, | 382 scoped_ptr<syncer::SyncNotifier> sync_notifier, |
384 const std::string& restored_key_for_bootstrapping, | 383 const std::string& restored_key_for_bootstrapping, |
385 TestingMode testing_mode, | 384 TestingMode testing_mode, |
386 syncer::Encryptor* encryptor, | 385 syncer::Encryptor* encryptor, |
387 syncer::UnrecoverableErrorHandler* unrecoverable_error_handler, | 386 syncer::UnrecoverableErrorHandler* unrecoverable_error_handler, |
388 syncer::ReportUnrecoverableErrorFunction | 387 syncer::ReportUnrecoverableErrorFunction |
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
516 virtual bool ReceivedExperiment(syncer::Experiments* experiments) const = 0; | 515 virtual bool ReceivedExperiment(syncer::Experiments* experiments) const = 0; |
517 | 516 |
518 // 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 |
519 // any remaining unsynced items. May be called on any thread. | 518 // any remaining unsynced items. May be called on any thread. |
520 virtual bool HasUnsyncedItems() const = 0; | 519 virtual bool HasUnsyncedItems() const = 0; |
521 }; | 520 }; |
522 | 521 |
523 } // namespace syncer | 522 } // namespace syncer |
524 | 523 |
525 #endif // SYNC_INTERNAL_API_PUBLIC_SYNC_MANAGER_H_ | 524 #endif // SYNC_INTERNAL_API_PUBLIC_SYNC_MANAGER_H_ |
OLD | NEW |