OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_HOMEDIR_METHODS_H_ | 5 #ifndef CHROMEOS_CRYPTOHOME_MOCK_HOMEDIR_METHODS_H_ |
6 #define CHROMEOS_CRYPTOHOME_MOCK_HOMEDIR_METHODS_H_ | 6 #define CHROMEOS_CRYPTOHOME_MOCK_HOMEDIR_METHODS_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
11 #include "base/callback.h" | 11 #include "base/callback.h" |
12 #include "chromeos/cryptohome/homedir_methods.h" | 12 #include "chromeos/cryptohome/homedir_methods.h" |
13 #include "testing/gmock/include/gmock/gmock.h" | 13 #include "testing/gmock/include/gmock/gmock.h" |
14 | 14 |
15 namespace cryptohome { | 15 namespace cryptohome { |
16 | 16 |
17 class CHROMEOS_EXPORT MockHomedirMethods : public HomedirMethods { | 17 class CHROMEOS_EXPORT MockHomedirMethods : public HomedirMethods { |
18 public: | 18 public: |
19 MockHomedirMethods(); | 19 MockHomedirMethods(); |
20 virtual ~MockHomedirMethods(); | 20 virtual ~MockHomedirMethods(); |
21 | 21 |
22 void SetUp(bool success, MountError return_code); | 22 void SetUp(bool success, MountError return_code); |
23 | 23 |
| 24 MOCK_METHOD3(GetKeyDataEx, |
| 25 void(const Identification& id, |
| 26 const std::string& label, |
| 27 const GetKeyDataCallback& callback)); |
24 MOCK_METHOD3(CheckKeyEx, | 28 MOCK_METHOD3(CheckKeyEx, |
25 void(const Identification& id, | 29 void(const Identification& id, |
26 const Authorization& key, | 30 const Authorization& key, |
27 const Callback& callback)); | 31 const Callback& callback)); |
28 MOCK_METHOD4(MountEx, | 32 MOCK_METHOD4(MountEx, |
29 void(const Identification& id, | 33 void(const Identification& id, |
30 const Authorization& key, | 34 const Authorization& key, |
31 const MountParameters& request, | 35 const MountParameters& request, |
32 const MountCallback& callback)); | 36 const MountCallback& callback)); |
33 MOCK_METHOD5(AddKeyEx, | 37 MOCK_METHOD5(AddKeyEx, |
(...skipping 20 matching lines...) Expand all Loading... |
54 | 58 |
55 void DoCallback(const Callback& callback); | 59 void DoCallback(const Callback& callback); |
56 void DoMountCallback(const MountCallback& callback); | 60 void DoMountCallback(const MountCallback& callback); |
57 | 61 |
58 DISALLOW_COPY_AND_ASSIGN(MockHomedirMethods); | 62 DISALLOW_COPY_AND_ASSIGN(MockHomedirMethods); |
59 }; | 63 }; |
60 | 64 |
61 } // namespace cryptohome | 65 } // namespace cryptohome |
62 | 66 |
63 #endif // CHROMEOS_CRYPTOHOME_MOCK_HOMEDIR_METHODS_H_ | 67 #endif // CHROMEOS_CRYPTOHOME_MOCK_HOMEDIR_METHODS_H_ |
OLD | NEW |