Chromium Code Reviews| 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_ |