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

Unified Diff: sync/internal_api/sync_encryption_handler_impl.cc

Issue 1250503002: [Sync] Don't require keystore migration time to be set in nigori node (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address comment Created 5 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
« no previous file with comments | « no previous file | sync/internal_api/sync_encryption_handler_impl_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sync/internal_api/sync_encryption_handler_impl.cc
diff --git a/sync/internal_api/sync_encryption_handler_impl.cc b/sync/internal_api/sync_encryption_handler_impl.cc
index f83c3e1a282b13e0ac685a44b32da50e5a31e274..2d2b0cff7d951e0eb911af16b1524aed23eda614 100644
--- a/sync/internal_api/sync_encryption_handler_impl.cc
+++ b/sync/internal_api/sync_encryption_handler_impl.cc
@@ -70,15 +70,12 @@ enum NigoriMigrationState {
// The new passphrase state is sufficient to determine whether a nigori node
// is migrated to support keystore encryption. In addition though, we also
// want to verify the conditions for proper keystore encryption functionality.
-// 1. Passphrase state is set.
-// 2. Migration time is set.
-// 3. Frozen keybag is true
-// 4. If passphrase state is keystore, keystore_decryptor_token is set.
+// 1. Passphrase type is set.
+// 2. Frozen keybag is true
+// 3. If passphrase state is keystore, keystore_decryptor_token is set.
bool IsNigoriMigratedToKeystore(const sync_pb::NigoriSpecifics& nigori) {
if (!nigori.has_passphrase_type())
return false;
- if (!nigori.has_keystore_migration_time())
- return false;
if (!nigori.keybag_is_frozen())
return false;
if (nigori.passphrase_type() ==
@@ -88,8 +85,6 @@ bool IsNigoriMigratedToKeystore(const sync_pb::NigoriSpecifics& nigori) {
sync_pb::NigoriSpecifics::KEYSTORE_PASSPHRASE &&
nigori.keystore_decryptor_token().blob().empty())
return false;
- if (!nigori.has_keystore_migration_time())
- return false;
return true;
}
@@ -896,7 +891,6 @@ bool SyncEncryptionHandlerImpl::ApplyNigoriUpdateImpl(
}
bool is_nigori_migrated = IsNigoriMigratedToKeystore(nigori);
if (is_nigori_migrated) {
- DCHECK(nigori.has_keystore_migration_time());
migration_time_ = ProtoTimeToTime(nigori.keystore_migration_time());
PassphraseType nigori_passphrase_type =
ProtoPassphraseTypeToEnum(nigori.passphrase_type());
« no previous file with comments | « no previous file | sync/internal_api/sync_encryption_handler_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698