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

Unified Diff: sync/internal_api/sync_manager_impl.cc

Issue 10455012: [Sync] Add support for performing a GetKey on startup. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Move GetEncryptionKey logic into GetUpdates Created 8 years, 5 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
Index: sync/internal_api/sync_manager_impl.cc
diff --git a/sync/internal_api/sync_manager_impl.cc b/sync/internal_api/sync_manager_impl.cc
index 1a26fe048f9e196b8dc6e762637b0a06b43bb2a3..97882295ba2958cb9dd586f566b5b569ddb6df94 100644
--- a/sync/internal_api/sync_manager_impl.cc
+++ b/sync/internal_api/sync_manager_impl.cc
@@ -185,6 +185,7 @@ class SyncManagerImpl::SyncInternal
const SyncCredentials& credentials,
scoped_ptr<syncer::SyncNotifier> sync_notifier,
const std::string& restored_key_for_bootstrapping,
+ bool keystore_encryption_enabled,
SyncManager::TestingMode testing_mode,
Encryptor* encryptor,
UnrecoverableErrorHandler* unrecoverable_error_handler,
@@ -722,6 +723,7 @@ bool SyncManagerImpl::Init(
const SyncCredentials& credentials,
scoped_ptr<syncer::SyncNotifier> sync_notifier,
const std::string& restored_key_for_bootstrapping,
+ bool keystore_encryption_enabled,
SyncManager::TestingMode testing_mode,
Encryptor* encryptor,
UnrecoverableErrorHandler* unrecoverable_error_handler,
@@ -744,6 +746,7 @@ bool SyncManagerImpl::Init(
credentials,
sync_notifier.Pass(),
restored_key_for_bootstrapping,
+ keystore_encryption_enabled,
testing_mode,
encryptor,
unrecoverable_error_handler,
@@ -848,15 +851,9 @@ void SyncManagerImpl::ConfigureSyncer(
}
}
- // TODO(zea): set this based on whether cryptographer has keystore
- // encryption key or not (requires opening a transaction). crbug.com/129665.
- ConfigurationParams::KeystoreKeyStatus keystore_key_status =
- ConfigurationParams::KEYSTORE_KEY_UNNECESSARY;
-
ConfigurationParams params(GetSourceFromReason(reason),
types_to_config,
new_routing_info,
- keystore_key_status,
ready_task);
if (!data_->scheduler()) {
@@ -888,6 +885,7 @@ bool SyncManagerImpl::SyncInternal::Init(
const SyncCredentials& credentials,
scoped_ptr<syncer::SyncNotifier> sync_notifier,
const std::string& restored_key_for_bootstrapping,
+ bool keystore_encryption_enabled,
SyncManager::TestingMode testing_mode,
Encryptor* encryptor,
UnrecoverableErrorHandler* unrecoverable_error_handler,
@@ -962,7 +960,8 @@ bool SyncManagerImpl::SyncInternal::Init(
&throttled_data_type_tracker_,
listeners,
&debug_info_event_listener_,
- &traffic_recorder_));
+ &traffic_recorder_,
+ keystore_encryption_enabled));
session_context()->set_account_name(credentials.email);
scheduler_.reset(new SyncScheduler(name_, session_context(), new Syncer()));
}

Powered by Google App Engine
This is Rietveld 408576698