| 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_
|
|
|