Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(162)

Side by Side Diff: sync/internal_api/public/sync_manager.h

Issue 10804039: Make SyncBackendRegistrar aware of loaded data (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 8 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 280 matching lines...) Expand 10 before | Expand all | Expand 10 after
291 * Gets child ids for a given id. 291 * Gets child ids for a given id.
292 * 292 *
293 * @param {string} id 64-bit id in decimal string form of the parent 293 * @param {string} id 64-bit id in decimal string form of the parent
294 * node. 294 * node.
295 * @param {Array.<string>} callback Called with the (possibly empty) 295 * @param {Array.<string>} callback Called with the (possibly empty)
296 * list of child ids. 296 * list of child ids.
297 */ 297 */
298 // function getChildNodeIds(id); 298 // function getChildNodeIds(id);
299 299
300 virtual void OnInitializationComplete( 300 virtual void OnInitializationComplete(
301 const WeakHandle<JsBackend>& js_backend, bool success) = 0; 301 const WeakHandle<syncer::JsBackend>& js_backend,
302 bool success,
303 syncer::ModelTypeSet restored_types) = 0;
302 304
303 // We are no longer permitted to communicate with the server. Sync should 305 // 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 306 // 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 307 // of reasons, e.g. swapping from a test instance to production, or a
306 // global stop syncing operation has wiped the store. 308 // global stop syncing operation has wiped the store.
307 virtual void OnStopSyncingPermanently() = 0; 309 virtual void OnStopSyncingPermanently() = 0;
308 310
309 // Called when the set of encrypted types or the encrypt 311 // Called when the set of encrypted types or the encrypt
310 // everything flag has been changed. Note that encryption isn't 312 // everything flag has been changed. Note that encryption isn't
311 // complete until the OnEncryptionComplete() notification has been 313 // complete until the OnEncryptionComplete() notification has been
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
362 // TODO(akalin): Replace the |post_factory| parameter with a 364 // TODO(akalin): Replace the |post_factory| parameter with a
363 // URLFetcher parameter. 365 // URLFetcher parameter.
364 virtual bool Init( 366 virtual bool Init(
365 const FilePath& database_location, 367 const FilePath& database_location,
366 const WeakHandle<JsEventHandler>& event_handler, 368 const WeakHandle<JsEventHandler>& event_handler,
367 const std::string& sync_server_and_path, 369 const std::string& sync_server_and_path,
368 int sync_server_port, 370 int sync_server_port,
369 bool use_ssl, 371 bool use_ssl,
370 const scoped_refptr<base::TaskRunner>& blocking_task_runner, 372 const scoped_refptr<base::TaskRunner>& blocking_task_runner,
371 scoped_ptr<HttpPostProviderFactory> post_factory, 373 scoped_ptr<HttpPostProviderFactory> post_factory,
372 const ModelSafeRoutingInfo& model_safe_routing_info,
373 const std::vector<ModelSafeWorker*>& workers, 374 const std::vector<ModelSafeWorker*>& workers,
374 ExtensionsActivityMonitor* extensions_activity_monitor, 375 ExtensionsActivityMonitor* extensions_activity_monitor,
375 ChangeDelegate* change_delegate, 376 ChangeDelegate* change_delegate,
376 const SyncCredentials& credentials, 377 const SyncCredentials& credentials,
377 scoped_ptr<SyncNotifier> sync_notifier, 378 scoped_ptr<SyncNotifier> sync_notifier,
378 const std::string& restored_key_for_bootstrapping, 379 const std::string& restored_key_for_bootstrapping,
379 scoped_ptr<InternalComponentsFactory> internal_components_factory, 380 scoped_ptr<InternalComponentsFactory> internal_components_factory,
380 Encryptor* encryptor, 381 Encryptor* encryptor,
381 UnrecoverableErrorHandler* unrecoverable_error_handler, 382 UnrecoverableErrorHandler* unrecoverable_error_handler,
382 ReportUnrecoverableErrorFunction report_unrecoverable_error_function) = 0; 383 ReportUnrecoverableErrorFunction report_unrecoverable_error_function) = 0;
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
509 virtual bool ReceivedExperiment(Experiments* experiments) = 0; 510 virtual bool ReceivedExperiment(Experiments* experiments) = 0;
510 511
511 // Uses a read-only transaction to determine if the directory being synced has 512 // Uses a read-only transaction to determine if the directory being synced has
512 // any remaining unsynced items. May be called on any thread. 513 // any remaining unsynced items. May be called on any thread.
513 virtual bool HasUnsyncedItems() = 0; 514 virtual bool HasUnsyncedItems() = 0;
514 }; 515 };
515 516
516 } // namespace syncer 517 } // namespace syncer
517 518
518 #endif // SYNC_INTERNAL_API_PUBLIC_SYNC_MANAGER_H_ 519 #endif // SYNC_INTERNAL_API_PUBLIC_SYNC_MANAGER_H_
OLDNEW
« no previous file with comments | « sync/internal_api/public/internal_components_factory_impl.h ('k') | sync/internal_api/public/test/fake_sync_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698