Index: chrome/browser/sync/engine/nigori_util.h |
diff --git a/chrome/browser/sync/engine/nigori_util.h b/chrome/browser/sync/engine/nigori_util.h |
index 3d694c1cffb1e4267edbb601f6d6503c50dda2ed..b2250452ebe207bd11efe1032cbfcdb1c6d65ed0 100644 |
--- a/chrome/browser/sync/engine/nigori_util.h |
+++ b/chrome/browser/sync/engine/nigori_util.h |
@@ -15,11 +15,16 @@ namespace browser_sync { |
class Cryptographer; |
} |
+namespace sync_pb { |
+class EntitySpecifics; |
+} |
+ |
namespace syncable { |
const char kEncryptedString[] = "encrypted"; |
class BaseTransaction; |
+class Entry; |
class ReadTransaction; |
class WriteTransaction; |
@@ -43,6 +48,16 @@ bool ProcessUnsyncedChangesForEncryption( |
WriteTransaction* const trans, |
browser_sync::Cryptographer* cryptographer); |
+// Returns true if the entry requires encryption but is not encrypted, false |
+// otherwise. Note: this does not check that already encrypted entries are |
+// encrypted with the proper key. |
+bool EntryNeedsEncryption(const ModelTypeSet& encrypted_types, |
+ const Entry& entry); |
+ |
+// Same as EntryNeedsEncryption, but looks at specifics. |
+bool SpecificsNeedsEncryption(const ModelTypeSet& encrypted_types, |
+ const sync_pb::EntitySpecifics& specifics); |
+ |
// Verifies all data of type |type| is encrypted appropriately. |
bool VerifyDataTypeEncryption(BaseTransaction* const trans, |
browser_sync::Cryptographer* cryptographer, |