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

Unified Diff: sync/engine/nigori_util.h

Issue 9699057: [Sync] Move 'sync' target to sync/ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address Tim's comments Created 8 years, 9 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/engine/net/url_translator.cc ('k') | sync/engine/nigori_util.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sync/engine/nigori_util.h
diff --git a/chrome/browser/sync/engine/nigori_util.h b/sync/engine/nigori_util.h
similarity index 79%
rename from chrome/browser/sync/engine/nigori_util.h
rename to sync/engine/nigori_util.h
index e135ca6d54af7f52f831500afe303d19f3e98b4e..67174c3ff9f27c2b95c20f11516a32f4652a9fb4 100644
--- a/chrome/browser/sync/engine/nigori_util.h
+++ b/sync/engine/nigori_util.h
@@ -4,13 +4,13 @@
// Various utility methods for nigori-based multi-type encryption.
-#ifndef CHROME_BROWSER_SYNC_ENGINE_NIGORI_UTIL_H_
-#define CHROME_BROWSER_SYNC_ENGINE_NIGORI_UTIL_H_
+#ifndef SYNC_ENGINE_NIGORI_UTIL_H_
+#define SYNC_ENGINE_NIGORI_UTIL_H_
#pragma once
#include "base/compiler_specific.h"
-#include "chrome/browser/sync/syncable/model_type.h"
#include "sync/protocol/nigori_specifics.pb.h"
+#include "sync/syncable/model_type.h"
namespace browser_sync {
class Cryptographer;
@@ -26,6 +26,7 @@ const char kEncryptedString[] = "encrypted";
class BaseTransaction;
class Entry;
+class MutableEntry;
class WriteTransaction;
// Check if our unsyced changes are encrypted if they need to be based on
@@ -61,6 +62,14 @@ bool VerifyDataTypeEncryptionForTest(
ModelType type,
bool is_encrypted) WARN_UNUSED_RESULT;
+// Stores |new_specifics| into |entry|, encrypting if necessary.
+// Returns false if an error encrypting occurred (does not modify |entry|).
+// Note: gracefully handles new_specifics aliasing with entry->Get(SPECIFICS).
+bool UpdateEntryWithEncryption(
+ browser_sync::Cryptographer* cryptographer,
+ const sync_pb::EntitySpecifics& new_specifics,
+ MutableEntry* entry);
+
} // namespace syncable
-#endif // CHROME_BROWSER_SYNC_ENGINE_NIGORI_UTIL_H_
+#endif // SYNC_ENGINE_NIGORI_UTIL_H_
« no previous file with comments | « sync/engine/net/url_translator.cc ('k') | sync/engine/nigori_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698