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

Side by Side Diff: mock_owner_key.h

Issue 6815021: [login_manager] Code to add the owner to the whitelist in a device policy (Closed) Base URL: http://git.chromium.org/git/login_manager.git@master
Patch Set: address gauravsh comments Created 9 years, 8 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 | « mock_device_policy.h ('k') | owner_key.h » ('j') | 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) 2011 The Chromium OS Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium OS 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 LOGIN_MANAGER_MOCK_OWNER_KEY_H_ 5 #ifndef LOGIN_MANAGER_MOCK_OWNER_KEY_H_
6 #define LOGIN_MANAGER_MOCK_OWNER_KEY_H_ 6 #define LOGIN_MANAGER_MOCK_OWNER_KEY_H_
7 7
8 #include "login_manager/owner_key.h" 8 #include "login_manager/owner_key.h"
9 9
10 #include <unistd.h> 10 #include <unistd.h>
11 #include <gmock/gmock.h> 11 #include <gmock/gmock.h>
12 12
13 namespace base { 13 namespace base {
14 class RSAPrivateKey; 14 class RSAPrivateKey;
15 } 15 }
16 16
17 namespace login_manager { 17 namespace login_manager {
18 class MockOwnerKey : public OwnerKey { 18 class MockOwnerKey : public OwnerKey {
19 public: 19 public:
20 MockOwnerKey() : OwnerKey(FilePath("")) {} 20 MockOwnerKey() : OwnerKey(FilePath("")) {}
21 virtual ~MockOwnerKey() {} 21 virtual ~MockOwnerKey() {}
22 MOCK_CONST_METHOD1(Equals, bool(const std::string&)); 22 MOCK_CONST_METHOD1(Equals, bool(const std::string&));
23 MOCK_CONST_METHOD1(VEquals, bool(const std::vector<uint8>&)); 23 MOCK_CONST_METHOD1(VEquals, bool(const std::vector<uint8>&));
24 MOCK_METHOD0(HaveCheckedDisk, bool()); 24 MOCK_CONST_METHOD0(HaveCheckedDisk, bool());
25 MOCK_METHOD0(IsPopulated, bool()); 25 MOCK_CONST_METHOD0(IsPopulated, bool());
26 MOCK_METHOD0(PopulateFromDiskIfPossible, bool()); 26 MOCK_METHOD0(PopulateFromDiskIfPossible, bool());
27 MOCK_METHOD1(PopulateFromBuffer, bool(const std::vector<uint8>&)); 27 MOCK_METHOD1(PopulateFromBuffer, bool(const std::vector<uint8>&));
28 MOCK_METHOD1(PopulateFromKeypair, bool(base::RSAPrivateKey*)); 28 MOCK_METHOD1(PopulateFromKeypair, bool(base::RSAPrivateKey*));
29 MOCK_METHOD0(Persist, bool()); 29 MOCK_METHOD0(Persist, bool());
30 MOCK_METHOD3(Rotate, bool(const std::vector<uint8>&, const uint8*, uint32)); 30 MOCK_METHOD3(Rotate, bool(const std::vector<uint8>&, const uint8*, uint32));
31 MOCK_METHOD1(ClobberCompromisedKey, void(const std::vector<uint8>&)); 31 MOCK_METHOD1(ClobberCompromisedKey, void(const std::vector<uint8>&));
32 MOCK_METHOD4(Verify, bool(const uint8*, uint32, const uint8*, uint32)); 32 MOCK_METHOD4(Verify, bool(const uint8*, uint32, const uint8*, uint32));
33 MOCK_METHOD3(Sign, bool(const uint8*, uint32, std::vector<uint8>*)); 33 MOCK_METHOD3(Sign, bool(const uint8*, uint32, std::vector<uint8>*));
34 MOCK_METHOD1(StartGeneration, int(ChildJobInterface*)); 34 MOCK_METHOD1(StartGeneration, int(ChildJobInterface*));
35 }; 35 };
36 } // namespace login_manager 36 } // namespace login_manager
37 37
38 #endif // LOGIN_MANAGER_MOCK_OWNER_KEY_H_ 38 #endif // LOGIN_MANAGER_MOCK_OWNER_KEY_H_
OLDNEW
« no previous file with comments | « mock_device_policy.h ('k') | owner_key.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698