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

Side by Side Diff: mock_platform.h

Issue 6771026: mock_platform: fix argument count for GetGroupId mock (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/cryptohome.git@master
Patch Set: 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 | « no previous file | 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) 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 CRYPTOHOME_MOCK_PLATFORM_H_ 5 #ifndef CRYPTOHOME_MOCK_PLATFORM_H_
6 #define CRYPTOHOME_MOCK_PLATFORM_H_ 6 #define CRYPTOHOME_MOCK_PLATFORM_H_
7 7
8 #include "mount.h" 8 #include "mount.h"
9 9
10 #include <gmock/gmock.h> 10 #include <gmock/gmock.h>
(...skipping 20 matching lines...) Expand all
31 const std::string&, const std::string&)); 31 const std::string&, const std::string&));
32 MOCK_METHOD3(Unmount, bool(const std::string&, bool, bool*)); 32 MOCK_METHOD3(Unmount, bool(const std::string&, bool, bool*));
33 MOCK_METHOD1(IsDirectoryMounted, bool(const std::string&)); 33 MOCK_METHOD1(IsDirectoryMounted, bool(const std::string&));
34 MOCK_METHOD2(IsDirectoryMountedWith, bool(const std::string&, 34 MOCK_METHOD2(IsDirectoryMountedWith, bool(const std::string&,
35 const std::string&)); 35 const std::string&));
36 MOCK_METHOD2(TerminatePidsWithOpenFiles, bool(const std::string&, bool)); 36 MOCK_METHOD2(TerminatePidsWithOpenFiles, bool(const std::string&, bool));
37 MOCK_METHOD2(TerminatePidsForUser, bool(const uid_t, bool)); 37 MOCK_METHOD2(TerminatePidsForUser, bool(const uid_t, bool));
38 MOCK_METHOD3(SetOwnership, bool(const std::string&, uid_t, gid_t)); 38 MOCK_METHOD3(SetOwnership, bool(const std::string&, uid_t, gid_t));
39 MOCK_METHOD3(SetOwnershipRecursive, bool(const std::string&, uid_t, gid_t)); 39 MOCK_METHOD3(SetOwnershipRecursive, bool(const std::string&, uid_t, gid_t));
40 MOCK_METHOD3(GetUserId, bool(const std::string&, uid_t*, gid_t*)); 40 MOCK_METHOD3(GetUserId, bool(const std::string&, uid_t*, gid_t*));
41 MOCK_METHOD3(GetGroupId, bool(const std::string&, gid_t*)); 41 MOCK_METHOD2(GetGroupId, bool(const std::string&, gid_t*));
42 MOCK_CONST_METHOD1(AmountOfFreeDiskSpace, int64(const std::string&)); 42 MOCK_CONST_METHOD1(AmountOfFreeDiskSpace, int64(const std::string&));
43 MOCK_METHOD2(Symlink, bool(const std::string&, const std::string&)); 43 MOCK_METHOD2(Symlink, bool(const std::string&, const std::string&));
44 MOCK_METHOD4(Exec, bool(const std::string&, const std::vector<std::string>&, 44 MOCK_METHOD4(Exec, bool(const std::string&, const std::vector<std::string>&,
45 uid_t, gid_t)); 45 uid_t, gid_t));
46 46
47 private: 47 private:
48 bool MockGetUserId(const std::string& user, uid_t* user_id, gid_t* group_id) { 48 bool MockGetUserId(const std::string& user, uid_t* user_id, gid_t* group_id) {
49 *user_id = getuid(); 49 *user_id = getuid();
50 *group_id = getgid(); 50 *group_id = getgid();
51 return true; 51 return true;
52 } 52 }
53 }; 53 };
54 } // namespace cryptohome 54 } // namespace cryptohome
55 55
56 #endif // CRYPTOHOME_MOCK_PLATFORM_H_ 56 #endif // CRYPTOHOME_MOCK_PLATFORM_H_
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698