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

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

Issue 2130453004: [Sync] Move //sync to //components/sync. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 4 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
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_TEST_FAKE_SYNC_ENCRYPTION_HANDLER_H_ 5 #ifndef COMPONENTS_SYNC_TEST_FAKE_SYNC_ENCRYPTION_HANDLER_H_
6 #define SYNC_TEST_FAKE_SYNC_ENCRYPTION_HANDLER_H_ 6 #define COMPONENTS_SYNC_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"
11 #include "base/observer_list.h" 11 #include "base/observer_list.h"
12 #include "sync/internal_api/public/sync_encryption_handler.h" 12 #include "components/sync/base/cryptographer.h"
13 #include "sync/syncable/nigori_handler.h" 13 #include "components/sync/core/sync_encryption_handler.h"
14 #include "sync/test/fake_encryptor.h" 14 #include "components/sync/syncable/nigori_handler.h"
15 #include "sync/util/cryptographer.h" 15 #include "components/sync/test/fake_encryptor.h"
16 16
17 namespace syncer { 17 namespace syncer {
18 18
19 // A fake sync encryption handler capable of keeping track of the encryption 19 // A fake sync encryption handler capable of keeping track of the encryption
20 // state without opening any transactions or interacting with the nigori node. 20 // state without opening any transactions or interacting with the nigori node.
21 // Note that this only performs basic interactions with the cryptographer 21 // Note that this only performs basic interactions with the cryptographer
22 // (setting pending keys, installing keys). 22 // (setting pending keys, installing keys).
23 // Note: NOT thread safe. If threads attempt to check encryption state 23 // Note: NOT thread safe. If threads attempt to check encryption state
24 // while another thread is modifying it, races can occur. 24 // while another thread is modifying it, races can occur.
25 class FakeSyncEncryptionHandler : public SyncEncryptionHandler, 25 class FakeSyncEncryptionHandler : public SyncEncryptionHandler,
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 bool encrypt_everything_; 60 bool encrypt_everything_;
61 PassphraseType passphrase_type_; 61 PassphraseType passphrase_type_;
62 62
63 FakeEncryptor encryptor_; 63 FakeEncryptor encryptor_;
64 Cryptographer cryptographer_; 64 Cryptographer cryptographer_;
65 std::string keystore_key_; 65 std::string keystore_key_;
66 }; 66 };
67 67
68 } // namespace syncer 68 } // namespace syncer
69 69
70 #endif // SYNC_TEST_FAKE_SYNC_ENCRYPTION_HANDLER_H_ 70 #endif // COMPONENTS_SYNC_TEST_FAKE_SYNC_ENCRYPTION_HANDLER_H_
OLDNEW
« no previous file with comments | « components/sync/test/fake_server/unique_client_entity.cc ('k') | components/sync/test/fake_sync_encryption_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698