Makes the is_blocking method public.
[chromium-blink-merge.git] / chromeos / cryptohome / mock_cryptohome_library.h
bloba8c6ef9064e6c6ea494fc701909dadb7db158314
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
3 // found in the LICENSE file.
5 #ifndef CHROMEOS_CRYPTOHOME_MOCK_CRYPTOHOME_LIBRARY_H_
6 #define CHROMEOS_CRYPTOHOME_MOCK_CRYPTOHOME_LIBRARY_H_
8 #include <string>
10 #include "base/basictypes.h"
11 #include "chromeos/cryptohome/cryptohome_library.h"
12 #include "testing/gmock/include/gmock/gmock.h"
14 using ::testing::Invoke;
15 using ::testing::WithArgs;
16 using ::testing::_;
18 namespace chromeos {
20 class MockCryptohomeLibrary : public CryptohomeLibrary {
21 public:
22 MockCryptohomeLibrary();
23 virtual ~MockCryptohomeLibrary();
24 MOCK_METHOD0(GetSystemSalt, std::string(void));
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 MOCK_METHOD1(TpmGetPassword, bool(std::string* password));
31 MOCK_METHOD0(TpmCanAttemptOwnership, void(void));
32 MOCK_METHOD0(TpmClearStoredPassword, void(void));
34 MOCK_METHOD2(InstallAttributesGet, bool(const std::string&, std::string*));
35 MOCK_METHOD2(InstallAttributesSet, bool(const std::string&,
36 const std::string&));
37 MOCK_METHOD0(InstallAttributesFinalize, bool(void));
38 MOCK_METHOD0(InstallAttributesIsReady, bool(void));
39 MOCK_METHOD0(InstallAttributesIsInvalid, bool(void));
40 MOCK_METHOD0(InstallAttributesIsFirstInstall, bool(void));
42 MOCK_METHOD1(EncryptWithSystemSalt, std::string(const std::string&));
43 MOCK_METHOD1(DecryptWithSystemSalt, std::string(const std::string&));
45 private:
46 DISALLOW_COPY_AND_ASSIGN(MockCryptohomeLibrary);
49 } // namespace chromeos
51 #endif // CHROMEOS_CRYPTOHOME_MOCK_CRYPTOHOME_LIBRARY_H_