OLD | NEW |
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 #include "sync/internal_api/sync_encryption_handler_impl.h" | 5 #include "sync/internal_api/sync_encryption_handler_impl.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
10 #include "base/message_loop.h" | 10 #include "base/message_loop.h" |
(...skipping 27 matching lines...) Expand all Loading... |
38 public: | 38 public: |
39 MOCK_METHOD2(OnPassphraseRequired, | 39 MOCK_METHOD2(OnPassphraseRequired, |
40 void(PassphraseRequiredReason, | 40 void(PassphraseRequiredReason, |
41 const sync_pb::EncryptedData&)); // NOLINT | 41 const sync_pb::EncryptedData&)); // NOLINT |
42 MOCK_METHOD0(OnPassphraseAccepted, void()); // NOLINT | 42 MOCK_METHOD0(OnPassphraseAccepted, void()); // NOLINT |
43 MOCK_METHOD1(OnBootstrapTokenUpdated, void(const std::string&)); // NOLINT | 43 MOCK_METHOD1(OnBootstrapTokenUpdated, void(const std::string&)); // NOLINT |
44 MOCK_METHOD2(OnEncryptedTypesChanged, | 44 MOCK_METHOD2(OnEncryptedTypesChanged, |
45 void(ModelTypeSet, bool)); // NOLINT | 45 void(ModelTypeSet, bool)); // NOLINT |
46 MOCK_METHOD0(OnEncryptionComplete, void()); // NOLINT | 46 MOCK_METHOD0(OnEncryptionComplete, void()); // NOLINT |
47 MOCK_METHOD1(OnCryptographerStateChanged, void(Cryptographer*)); // NOLINT | 47 MOCK_METHOD1(OnCryptographerStateChanged, void(Cryptographer*)); // NOLINT |
| 48 MOCK_METHOD1(OnPassphraseStateChanged, void(PassphraseState)); // NOLINT |
48 }; | 49 }; |
49 | 50 |
50 } // namespace | 51 } // namespace |
51 | 52 |
52 class SyncEncryptionHandlerImplTest : public ::testing::Test { | 53 class SyncEncryptionHandlerImplTest : public ::testing::Test { |
53 public: | 54 public: |
54 SyncEncryptionHandlerImplTest() {} | 55 SyncEncryptionHandlerImplTest() {} |
55 virtual ~SyncEncryptionHandlerImplTest() {} | 56 virtual ~SyncEncryptionHandlerImplTest() {} |
56 | 57 |
57 virtual void SetUp() { | 58 virtual void SetUp() { |
(...skipping 349 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
407 other_encrypted_specifics.encrypted())); | 408 other_encrypted_specifics.encrypted())); |
408 EXPECT_TRUE(GetCryptographer()->CanDecrypt(nigori.encrypted())); | 409 EXPECT_TRUE(GetCryptographer()->CanDecrypt(nigori.encrypted())); |
409 EXPECT_TRUE(nigori.encrypt_everything()); | 410 EXPECT_TRUE(nigori.encrypt_everything()); |
410 EXPECT_TRUE( | 411 EXPECT_TRUE( |
411 GetCryptographer()->CanDecryptUsingDefaultKey(nigori.encrypted())); | 412 GetCryptographer()->CanDecryptUsingDefaultKey(nigori.encrypted())); |
412 } | 413 } |
413 EXPECT_TRUE(encryption_handler()->EncryptEverythingEnabled()); | 414 EXPECT_TRUE(encryption_handler()->EncryptEverythingEnabled()); |
414 } | 415 } |
415 | 416 |
416 } // namespace syncer | 417 } // namespace syncer |
OLD | NEW |