| Index: sync/test/fake_sync_encryption_handler.h
|
| diff --git a/sync/test/fake_sync_encryption_handler.h b/sync/test/fake_sync_encryption_handler.h
|
| index 83a2e63a3f2a9851c4fe5a0f882e494bd6c5c1ee..7456a0829e73b2c13dd1dfc32cbc2a94e719ffcd 100644
|
| --- a/sync/test/fake_sync_encryption_handler.h
|
| +++ b/sync/test/fake_sync_encryption_handler.h
|
| @@ -11,11 +11,11 @@
|
| #include "base/observer_list.h"
|
| #include "sync/internal_api/public/sync_encryption_handler.h"
|
| #include "sync/syncable/nigori_handler.h"
|
| +#include "sync/test/fake_encryptor.h"
|
| +#include "sync/util/cryptographer.h"
|
|
|
| namespace syncer {
|
|
|
| -class Cryptographer;
|
| -
|
| // A fake sync encryption handler capable of keeping track of the encryption
|
| // state without opening any transactions or interacting with the nigori node.
|
| // Note that this only performs basic interactions with the cryptographer
|
| @@ -28,10 +28,6 @@ class FakeSyncEncryptionHandler : public SyncEncryptionHandler,
|
| FakeSyncEncryptionHandler();
|
| virtual ~FakeSyncEncryptionHandler();
|
|
|
| - void set_cryptographer(Cryptographer* cryptographer) {
|
| - cryptographer_ = cryptographer;
|
| - }
|
| -
|
| // SyncEncryptionHandler implementation.
|
| virtual void AddObserver(Observer* observer) OVERRIDE;
|
| virtual void RemoveObserver(Observer* observer) OVERRIDE;
|
| @@ -47,10 +43,13 @@ class FakeSyncEncryptionHandler : public SyncEncryptionHandler,
|
| virtual void ApplyNigoriUpdate(
|
| const sync_pb::NigoriSpecifics& nigori,
|
| syncable::BaseTransaction* const trans) OVERRIDE;
|
| - virtual ModelTypeSet GetEncryptedTypes() const OVERRIDE;
|
| virtual void UpdateNigoriFromEncryptedTypes(
|
| sync_pb::NigoriSpecifics* nigori,
|
| syncable::BaseTransaction* const trans) const OVERRIDE;
|
| + virtual ModelTypeSet GetEncryptedTypes(
|
| + syncable::BaseTransaction* const trans) const OVERRIDE;
|
| +
|
| + Cryptographer* cryptographer() { return &cryptographer_; }
|
|
|
| private:
|
| ObserverList<SyncEncryptionHandler::Observer> observers_;
|
| @@ -58,7 +57,8 @@ class FakeSyncEncryptionHandler : public SyncEncryptionHandler,
|
| bool encrypt_everything_;
|
| bool explicit_passphrase_;
|
|
|
| - Cryptographer* cryptographer_;
|
| + FakeEncryptor encryptor_;
|
| + Cryptographer cryptographer_;
|
| };
|
|
|
| } // namespace syncer
|
|
|