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

Side by Side Diff: sync/test/fake_sync_encryption_handler.h

Issue 10824410: [Sync] Refactor passphrase state handling (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 8 years, 4 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « sync/protocol/client_debug_info.proto ('k') | sync/test/fake_sync_encryption_handler.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef SYNC_SYNCABLE_TEST_FAKE_SYNC_ENCRYPTION_HANDLER_H_ 5 #ifndef SYNC_SYNCABLE_TEST_FAKE_SYNC_ENCRYPTION_HANDLER_H_
6 #define SYNC_SYNCABLE_TEST_FAKE_SYNC_ENCRYPTION_HANDLER_H_ 6 #define SYNC_SYNCABLE_TEST_FAKE_SYNC_ENCRYPTION_HANDLER_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
(...skipping 19 matching lines...) Expand all
30 30
31 // SyncEncryptionHandler implementation. 31 // SyncEncryptionHandler implementation.
32 virtual void AddObserver(Observer* observer) OVERRIDE; 32 virtual void AddObserver(Observer* observer) OVERRIDE;
33 virtual void RemoveObserver(Observer* observer) OVERRIDE; 33 virtual void RemoveObserver(Observer* observer) OVERRIDE;
34 virtual void Init() OVERRIDE; 34 virtual void Init() OVERRIDE;
35 virtual void SetEncryptionPassphrase(const std::string& passphrase, 35 virtual void SetEncryptionPassphrase(const std::string& passphrase,
36 bool is_explicit) OVERRIDE; 36 bool is_explicit) OVERRIDE;
37 virtual void SetDecryptionPassphrase(const std::string& passphrase) OVERRIDE; 37 virtual void SetDecryptionPassphrase(const std::string& passphrase) OVERRIDE;
38 virtual void EnableEncryptEverything() OVERRIDE; 38 virtual void EnableEncryptEverything() OVERRIDE;
39 virtual bool EncryptEverythingEnabled() const OVERRIDE; 39 virtual bool EncryptEverythingEnabled() const OVERRIDE;
40 virtual bool IsUsingExplicitPassphrase() const OVERRIDE; 40 virtual PassphraseState GetPassphraseState() const OVERRIDE;
41 41
42 // NigoriHandler implemenation. 42 // NigoriHandler implemenation.
43 virtual void ApplyNigoriUpdate( 43 virtual void ApplyNigoriUpdate(
44 const sync_pb::NigoriSpecifics& nigori, 44 const sync_pb::NigoriSpecifics& nigori,
45 syncable::BaseTransaction* const trans) OVERRIDE; 45 syncable::BaseTransaction* const trans) OVERRIDE;
46 virtual void UpdateNigoriFromEncryptedTypes( 46 virtual void UpdateNigoriFromEncryptedTypes(
47 sync_pb::NigoriSpecifics* nigori, 47 sync_pb::NigoriSpecifics* nigori,
48 syncable::BaseTransaction* const trans) const OVERRIDE; 48 syncable::BaseTransaction* const trans) const OVERRIDE;
49 virtual ModelTypeSet GetEncryptedTypes( 49 virtual ModelTypeSet GetEncryptedTypes(
50 syncable::BaseTransaction* const trans) const OVERRIDE; 50 syncable::BaseTransaction* const trans) const OVERRIDE;
51 51
52 Cryptographer* cryptographer() { return &cryptographer_; } 52 Cryptographer* cryptographer() { return &cryptographer_; }
53 53
54 private: 54 private:
55 ObserverList<SyncEncryptionHandler::Observer> observers_; 55 ObserverList<SyncEncryptionHandler::Observer> observers_;
56 ModelTypeSet encrypted_types_; 56 ModelTypeSet encrypted_types_;
57 bool encrypt_everything_; 57 bool encrypt_everything_;
58 bool explicit_passphrase_; 58 PassphraseState passphrase_state_;
59 59
60 FakeEncryptor encryptor_; 60 FakeEncryptor encryptor_;
61 Cryptographer cryptographer_; 61 Cryptographer cryptographer_;
62 }; 62 };
63 63
64 } // namespace syncer 64 } // namespace syncer
65 65
66 #endif // SYNC_INTERNAL_API_PUBLIC_TEST_FAKE_SYNC_ENCRYPTION_HANDLER_H_ 66 #endif // SYNC_INTERNAL_API_PUBLIC_TEST_FAKE_SYNC_ENCRYPTION_HANDLER_H_
OLDNEW
« no previous file with comments | « sync/protocol/client_debug_info.proto ('k') | sync/test/fake_sync_encryption_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698