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

Side by Side Diff: chrome/browser/chromeos/cros/mock_cert_library.h

Issue 12870010: Add device-level token entryption to CertLibrary. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Renamed methods per review comments. Created 7 years, 9 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
« no previous file with comments | « chrome/browser/chromeos/cros/cert_library.cc ('k') | no next file » | 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 CHROME_BROWSER_CHROMEOS_CROS_MOCK_CERT_LIBRARY_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_CROS_MOCK_CERT_LIBRARY_H_
6 #define CHROME_BROWSER_CHROMEOS_CROS_MOCK_CERT_LIBRARY_H_ 6 #define CHROME_BROWSER_CHROMEOS_CROS_MOCK_CERT_LIBRARY_H_
7 7
8 #include "chrome/browser/chromeos/cros/cert_library.h" 8 #include "chrome/browser/chromeos/cros/cert_library.h"
9 #include "testing/gmock/include/gmock/gmock.h" 9 #include "testing/gmock/include/gmock/gmock.h"
10 10
11 namespace chromeos { 11 namespace chromeos {
12 12
13 class MockCertLibrary : public CertLibrary { 13 class MockCertLibrary : public CertLibrary {
14 public: 14 public:
15 MockCertLibrary(); 15 MockCertLibrary();
16 virtual ~MockCertLibrary(); 16 virtual ~MockCertLibrary();
17 17
18 MOCK_METHOD1(AddObserver, void(Observer* observer)); 18 MOCK_METHOD1(AddObserver, void(Observer* observer));
19 MOCK_METHOD1(RemoveObserver, void(Observer* observer)); 19 MOCK_METHOD1(RemoveObserver, void(Observer* observer));
20 MOCK_METHOD0(LoadKeyStore, void()); 20 MOCK_METHOD0(LoadKeyStore, void());
21 MOCK_CONST_METHOD0(CertificatesLoading, bool()); 21 MOCK_CONST_METHOD0(CertificatesLoading, bool());
22 MOCK_CONST_METHOD0(CertificatesLoaded, bool()); 22 MOCK_CONST_METHOD0(CertificatesLoaded, bool());
23 MOCK_CONST_METHOD0(IsHardwareBacked, bool()); 23 MOCK_CONST_METHOD0(IsHardwareBacked, bool());
24 MOCK_CONST_METHOD0(GetTpmTokenName, const std::string&()); 24 MOCK_CONST_METHOD0(GetTpmTokenName, const std::string&());
25 MOCK_CONST_METHOD0(GetCertificates, const CertList&()); 25 MOCK_CONST_METHOD0(GetCertificates, const CertList&());
26 MOCK_CONST_METHOD0(GetUserCertificates, const CertList&()); 26 MOCK_CONST_METHOD0(GetUserCertificates, const CertList&());
27 MOCK_CONST_METHOD0(GetServerCertificates, const CertList&()); 27 MOCK_CONST_METHOD0(GetServerCertificates, const CertList&());
28 MOCK_CONST_METHOD0(GetCACertificates, const CertList&()); 28 MOCK_CONST_METHOD0(GetCACertificates, const CertList&());
29 MOCK_METHOD1(EncryptToken, std::string(const std::string& token)); 29 MOCK_METHOD1(EncryptWithSystemSalt, std::string(const std::string& token));
30 MOCK_METHOD1(DecryptToken, std::string(const std::string& encrypted_token)); 30 MOCK_METHOD1(DecryptWithSystemSalt, std::string(
31 const std::string& encrypted_token));
32 MOCK_METHOD1(EncryptWithUserKey, std::string(const std::string& token));
33 MOCK_METHOD1(DecryptWithUserKey, std::string(
34 const std::string& encrypted_token));
31 35
32 private: 36 private:
33 DISALLOW_COPY_AND_ASSIGN(MockCertLibrary); 37 DISALLOW_COPY_AND_ASSIGN(MockCertLibrary);
34 }; 38 };
35 39
36 } // namespace chromeos 40 } // namespace chromeos
37 41
38 #endif // CHROME_BROWSER_CHROMEOS_CROS_MOCK_CERT_LIBRARY_H_ 42 #endif // CHROME_BROWSER_CHROMEOS_CROS_MOCK_CERT_LIBRARY_H_
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/cros/cert_library.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698