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

Unified Diff: chrome/browser/sync/engine/nigori_util.cc

Issue 7878005: [Sync] Fix encrypting of sync titles. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 3 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 | chrome/browser/sync/engine/syncer_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/sync/engine/nigori_util.cc
diff --git a/chrome/browser/sync/engine/nigori_util.cc b/chrome/browser/sync/engine/nigori_util.cc
index e84e13d21d1904dbbda2582bf6094265e22af104..df7016d07fbc7d2a08d9cc38a6e838824dfdb80c 100644
--- a/chrome/browser/sync/engine/nigori_util.cc
+++ b/chrome/browser/sync/engine/nigori_util.cc
@@ -59,7 +59,12 @@ bool EntryNeedsEncryption(const ModelTypeSet& encrypted_types,
const Entry& entry) {
if (!entry.Get(UNIQUE_SERVER_TAG).empty())
return false; // We don't encrypt unique server nodes.
- return SpecificsNeedsEncryption(encrypted_types, entry.Get(SPECIFICS));
+ syncable::ModelType type = entry.GetModelType();
+ if (type == PASSWORDS || type == NIGORI)
+ return false;
+ return SpecificsNeedsEncryption(encrypted_types, entry.Get(SPECIFICS)) ||
+ (encrypted_types.count(type) > 0 &&
+ entry.Get(NON_UNIQUE_NAME) != kEncryptedString);
tim (not reviewing) 2011/09/14 23:54:46 A comment to the effect of "We check NON_UNIQUE_NA
Nicolas Zea 2011/09/15 00:10:04 Done.
}
bool SpecificsNeedsEncryption(const ModelTypeSet& encrypted_types,
« no previous file with comments | « no previous file | chrome/browser/sync/engine/syncer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698