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

Side by Side Diff: chromeos/cryptohome/mock_cryptohome_library.h

Issue 24869003: cryptohome: Move stateless wrapper functions out of CryptohomeLibrary (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: address comments Created 7 years, 2 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 | « chromeos/cryptohome/cryptohome_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 CHROMEOS_CRYPTOHOME_MOCK_CRYPTOHOME_LIBRARY_H_ 5 #ifndef CHROMEOS_CRYPTOHOME_MOCK_CRYPTOHOME_LIBRARY_H_
6 #define CHROMEOS_CRYPTOHOME_MOCK_CRYPTOHOME_LIBRARY_H_ 6 #define CHROMEOS_CRYPTOHOME_MOCK_CRYPTOHOME_LIBRARY_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
11 #include "chromeos/cryptohome/cryptohome_library.h" 11 #include "chromeos/cryptohome/cryptohome_library.h"
12 #include "testing/gmock/include/gmock/gmock.h" 12 #include "testing/gmock/include/gmock/gmock.h"
13 13
14 using ::testing::Invoke; 14 using ::testing::Invoke;
15 using ::testing::WithArgs; 15 using ::testing::WithArgs;
16 using ::testing::_; 16 using ::testing::_;
17 17
18 namespace chromeos { 18 namespace chromeos {
19 19
20 class MockCryptohomeLibrary : public CryptohomeLibrary { 20 class MockCryptohomeLibrary : public CryptohomeLibrary {
21 public: 21 public:
22 MockCryptohomeLibrary(); 22 MockCryptohomeLibrary();
23 virtual ~MockCryptohomeLibrary(); 23 virtual ~MockCryptohomeLibrary();
24 MOCK_METHOD0(GetSystemSalt, std::string(void)); 24 MOCK_METHOD0(GetSystemSalt, std::string(void));
25 25
26 MOCK_METHOD0(TpmIsReady, bool(void));
27 MOCK_METHOD0(TpmIsEnabled, bool(void));
28 MOCK_METHOD0(TpmIsOwned, bool(void));
29 MOCK_METHOD0(TpmIsBeingOwned, bool(void));
30
31 MOCK_METHOD2(InstallAttributesGet, bool(const std::string&, std::string*));
32 MOCK_METHOD2(InstallAttributesSet, bool(const std::string&,
33 const std::string&));
34 MOCK_METHOD0(InstallAttributesFinalize, bool(void));
35 MOCK_METHOD0(InstallAttributesIsReady, bool(void));
36 MOCK_METHOD0(InstallAttributesIsInvalid, bool(void));
37 MOCK_METHOD0(InstallAttributesIsFirstInstall, bool(void));
38
39 MOCK_METHOD1(EncryptWithSystemSalt, std::string(const std::string&)); 26 MOCK_METHOD1(EncryptWithSystemSalt, std::string(const std::string&));
40 MOCK_METHOD1(DecryptWithSystemSalt, std::string(const std::string&)); 27 MOCK_METHOD1(DecryptWithSystemSalt, std::string(const std::string&));
41 28
42 private: 29 private:
43 DISALLOW_COPY_AND_ASSIGN(MockCryptohomeLibrary); 30 DISALLOW_COPY_AND_ASSIGN(MockCryptohomeLibrary);
44 }; 31 };
45 32
46 } // namespace chromeos 33 } // namespace chromeos
47 34
48 #endif // CHROMEOS_CRYPTOHOME_MOCK_CRYPTOHOME_LIBRARY_H_ 35 #endif // CHROMEOS_CRYPTOHOME_MOCK_CRYPTOHOME_LIBRARY_H_
OLDNEW
« no previous file with comments | « chromeos/cryptohome/cryptohome_library.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698