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

Unified Diff: sync/internal_api/sync_encryption_handler_impl.cc

Issue 1161463005: [Sync] Don't crash for encryption errors (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add comments Created 5 years, 6 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_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 4bf559fd8580c958fe0caa8d18ddfa01ceb933a5..565ca5f7e312bc699e7ce21b3607bb40c5810b4f 100644
--- a/sync/internal_api/sync_encryption_handler_impl.cc
+++ b/sync/internal_api/sync_encryption_handler_impl.cc
@@ -833,10 +833,8 @@ void SyncEncryptionHandlerImpl::ReEncryptEverything(
int64 child_id = passwords_root.GetFirstChildId();
while (child_id != kInvalidId) {
WriteNode child(trans);
- if (child.InitByIdLookup(child_id) != BaseNode::INIT_OK) {
- NOTREACHED();
- return;
- }
+ if (child.InitByIdLookup(child_id) != BaseNode::INIT_OK)
+ break;
stanisc 2015/06/09 00:04:02 It isn't clear how this could be possible. The ID
Nicolas Zea 2015/06/09 19:42:03 Lookup fails if we fail to decrypt as well (see Wr
child.SetPasswordSpecifics(child.GetPasswordSpecifics());
child_id = child.GetSuccessorId();
}

Powered by Google App Engine
This is Rietveld 408576698