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

Side by Side Diff: mock_platform.h

Issue 6598074: DoAutomaticFreeDiskSpaceControl() introduced (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/cryptohome.git@master
Patch Set: Created 9 years, 9 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 | « make_tests.cc ('k') | mount.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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 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 19 matching lines...) Expand all
30 MOCK_METHOD4(Mount, bool(const std::string&, const std::string&, 30 MOCK_METHOD4(Mount, bool(const std::string&, const std::string&,
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(GetUserId, bool(const std::string&, uid_t*, gid_t*)); 39 MOCK_METHOD3(GetUserId, bool(const std::string&, uid_t*, gid_t*));
40 MOCK_METHOD1(AmountOfFreeDiskSpace, int64(const std::string&));
40 41
41 private: 42 private:
42 bool MockGetUserId(const std::string& user, uid_t* user_id, gid_t* group_id) { 43 bool MockGetUserId(const std::string& user, uid_t* user_id, gid_t* group_id) {
43 *user_id = getuid(); 44 *user_id = getuid();
44 *group_id = getgid(); 45 *group_id = getgid();
45 return true; 46 return true;
46 } 47 }
47 }; 48 };
48 } // namespace cryptohome 49 } // namespace cryptohome
49 50
50 #endif // CRYPTOHOME_MOCK_PLATFORM_H_ 51 #endif // CRYPTOHOME_MOCK_PLATFORM_H_
OLDNEW
« no previous file with comments | « make_tests.cc ('k') | mount.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698