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

Unified Diff: chrome/browser/sync/glue/sync_backend_host_core.cc

Issue 451743002: Pass args to SyncManager::Init via a struct. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Use scoped_ptr instead of raw pointer. Created 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | sync/internal_api/public/sync_manager.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/sync/glue/sync_backend_host_core.cc
diff --git a/chrome/browser/sync/glue/sync_backend_host_core.cc b/chrome/browser/sync/glue/sync_backend_host_core.cc
index f73911b0769031d8bcd9eb99199e3f520544a541..350012cc8bd8a98cdd9bfee182692675d67811cc 100644
--- a/chrome/browser/sync/glue/sync_backend_host_core.cc
+++ b/chrome/browser/sync/glue/sync_backend_host_core.cc
@@ -430,22 +430,29 @@ void SyncBackendHostCore::DoInitialize(
sync_manager_ = options->sync_manager_factory->CreateSyncManager(name_);
sync_manager_->AddObserver(this);
- sync_manager_->Init(sync_data_folder_path_,
- options->event_handler,
- options->service_url,
- options->http_bridge_factory.Pass(),
- options->workers,
- options->extensions_activity,
- options->registrar /* as SyncManager::ChangeDelegate */,
- options->credentials,
- options->invalidator_client_id,
- options->restored_key_for_bootstrapping,
- options->restored_keystore_key_for_bootstrapping,
- options->internal_components_factory.get(),
- &encryptor_,
- options->unrecoverable_error_handler.Pass(),
- options->report_unrecoverable_error_function,
- &stop_syncing_signal_);
+
+ syncer::SyncManager::InitArgs args;
+ args.database_location = sync_data_folder_path_;
+ args.event_handler = options->event_handler;
+ args.service_url = options->service_url;
+ args.post_factory = options->http_bridge_factory.Pass();
+ args.workers = options->workers;
+ args.extensions_activity = options->extensions_activity;
+ args.change_delegate = options->registrar; // as SyncManager::ChangeDelegate
+ args.credentials = options->credentials;
+ args.invalidator_client_id = options->invalidator_client_id;
+ args.restored_key_for_bootstrapping = options->restored_key_for_bootstrapping;
+ args.restored_keystore_key_for_bootstrapping =
+ options->restored_keystore_key_for_bootstrapping;
+ args.internal_components_factory =
+ options->internal_components_factory.Pass();
+ args.encryptor = &encryptor_;
+ args.unrecoverable_error_handler =
+ options->unrecoverable_error_handler.Pass();
+ args.report_unrecoverable_error_function =
+ options->report_unrecoverable_error_function;
+ args.cancelation_signal = &stop_syncing_signal_;
+ sync_manager_->Init(&args);
}
void SyncBackendHostCore::DoUpdateCredentials(
« no previous file with comments | « no previous file | sync/internal_api/public/sync_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698