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

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

Issue 8468023: Move encryption related files from util folder to encryption folder. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: For review. Created 9 years, 1 month 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
Index: chrome/browser/sync/encryption/nigori_util.h
diff --git a/chrome/browser/sync/engine/nigori_util.h b/chrome/browser/sync/encryption/nigori_util.h
similarity index 72%
rename from chrome/browser/sync/engine/nigori_util.h
rename to chrome/browser/sync/encryption/nigori_util.h
index 2ff5a5362037050fb3566b1d0a2004d95de3e60b..1a62a9513bfe1e7940e9f20455c94214a9cd2b94 100644
--- a/chrome/browser/sync/engine/nigori_util.h
+++ b/chrome/browser/sync/encryption/nigori_util.h
@@ -4,8 +4,8 @@
// 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 CHROME_BROWSER_SYNC_ENCRYPTION_NIGORI_UTIL_H_
+#define CHROME_BROWSER_SYNC_ENCRYPTION_NIGORI_UTIL_H_
#pragma once
#include "base/compiler_specific.h"
@@ -21,13 +21,16 @@ class EntitySpecifics;
}
namespace syncable {
-
-const char kEncryptedString[] = "encrypted";
-
class BaseTransaction;
class Entry;
class ReadTransaction;
class WriteTransaction;
+}
+
+namespace browser_sync {
+namespace encryption {
+
+const char kEncryptedString[] = "encrypted";
// Check if our unsyced changes are encrypted if they need to be based on
Nicolas Zea 2011/11/17 21:04:30 unsyced -> unsynced
// |encrypted_types|.
@@ -36,32 +39,32 @@ class WriteTransaction;
// This method is similar to ProcessUnsyncedChangesForEncryption but does not
// modify the data and does not care if data is unnecessarily encrypted.
bool VerifyUnsyncedChangesAreEncrypted(
- BaseTransaction* const trans,
- const ModelTypeSet& encrypted_types);
+ syncable::BaseTransaction* const trans,
+ const syncable::ModelTypeSet& encrypted_types);
// Processes all unsynced changes and ensures they are appropriately encrypted
// or unencrypted, based on |encrypted_types|.
bool ProcessUnsyncedChangesForEncryption(
- WriteTransaction* const trans,
+ syncable::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);
+bool EntryNeedsEncryption(const syncable::ModelTypeSet& encrypted_types,
+ const syncable::Entry& entry);
// Same as EntryNeedsEncryption, but looks at specifics.
-bool SpecificsNeedsEncryption(const ModelTypeSet& encrypted_types,
+bool SpecificsNeedsEncryption(const syncable::ModelTypeSet& encrypted_types,
const sync_pb::EntitySpecifics& specifics);
// Verifies all data of type |type| is encrypted appropriately.
bool VerifyDataTypeEncryptionForTest(
- BaseTransaction* const trans,
+ syncable::BaseTransaction* const trans,
browser_sync::Cryptographer* cryptographer,
- ModelType type,
+ syncable::ModelType type,
bool is_encrypted) WARN_UNUSED_RESULT;
-} // namespace syncable
-
-#endif // CHROME_BROWSER_SYNC_ENGINE_NIGORI_UTIL_H_
+} // namespace encryption
+} // namespace browser_sync
Nicolas Zea 2011/11/17 21:04:30 newline after
+#endif // CHROME_BROWSER_SYNC_ENCRYPTION_NIGORI_UTIL_H_

Powered by Google App Engine
This is Rietveld 408576698