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

Unified Diff: sync/util/cryptographer.cc

Issue 1161463005: [Sync] Don't crash for encryption errors (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address final 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
« no previous file with comments | « sync/internal_api/write_node.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sync/util/cryptographer.cc
diff --git a/sync/util/cryptographer.cc b/sync/util/cryptographer.cc
index c22f0a322e6b0008f3f8aec3d336119aeb96594a..bccf9a28bd8ebbb2b0f90e7cb5e518f6f3c6b5ae 100644
--- a/sync/util/cryptographer.cc
+++ b/sync/util/cryptographer.cc
@@ -127,8 +127,10 @@ std::string Cryptographer::DecryptToString(
const sync_pb::EncryptedData& encrypted) const {
NigoriMap::const_iterator it = nigoris_.find(encrypted.key_name());
if (nigoris_.end() == it) {
- NOTREACHED() << "Cannot decrypt message";
- return std::string(); // Caller should have called CanDecrypt(encrypt).
+ // The key used to encrypt the blob is not part of the set of installed
+ // nigoris.
+ LOG(ERROR) << "Cannot decrypt message";
+ return std::string();
}
std::string plaintext;
« no previous file with comments | « sync/internal_api/write_node.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698