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

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

Issue 7795002: [Sync] Gracefully handle writing to a node when the cryptographer is not ready. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Reviewer comments Created 9 years, 4 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 | « chrome/browser/sync/engine/get_commit_ids_command.cc ('k') | chrome/browser/sync/engine/nigori_util.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.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,
« no previous file with comments | « chrome/browser/sync/engine/get_commit_ids_command.cc ('k') | chrome/browser/sync/engine/nigori_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698