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

Side by Side Diff: chromeos/process_mock.h

Issue 6865041: libchromeos: Support setting uid/gid of child processes in process.h (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/common.git@master
Patch Set: improve 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 | « chromeos/process.cc ('k') | chromeos/process_test.cc » ('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 CHROMEOS_PROCESS_MOCK_H_ 5 #ifndef CHROMEOS_PROCESS_MOCK_H_
6 #define CHROMEOS_PROCESS_MOCK_H_ 6 #define CHROMEOS_PROCESS_MOCK_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include <chromeos/process.h> 10 #include <chromeos/process.h>
11 #include <gmock/gmock.h> 11 #include <gmock/gmock.h>
12 12
13 namespace chromeos { 13 namespace chromeos {
14 14
15 class ProcessMock : public Process { 15 class ProcessMock : public Process {
16 public: 16 public:
17 ProcessMock() {} 17 ProcessMock() {}
18 virtual ~ProcessMock() {} 18 virtual ~ProcessMock() {}
19 19
20 MOCK_METHOD1(AddArg, void(const std::string& arg)); 20 MOCK_METHOD1(AddArg, void(const std::string& arg));
21 MOCK_METHOD1(RedirectOutput, void(const std::string& output_file)); 21 MOCK_METHOD1(RedirectOutput, void(const std::string& output_file));
22 MOCK_METHOD2(RedirectUsingPipe, void(int child_fd, bool is_input)); 22 MOCK_METHOD2(RedirectUsingPipe, void(int child_fd, bool is_input));
23 MOCK_METHOD1(SetUid, void(uid_t));
24 MOCK_METHOD1(SetGid, void(gid_t));
23 MOCK_METHOD1(GetPipe, int(int child_fd)); 25 MOCK_METHOD1(GetPipe, int(int child_fd));
24 MOCK_METHOD0(Start, bool()); 26 MOCK_METHOD0(Start, bool());
25 MOCK_METHOD0(Wait, int()); 27 MOCK_METHOD0(Wait, int());
26 MOCK_METHOD0(Run, int()); 28 MOCK_METHOD0(Run, int());
27 MOCK_METHOD0(pid, pid_t()); 29 MOCK_METHOD0(pid, pid_t());
28 MOCK_METHOD2(Kill, bool(int signal, int timeout)); 30 MOCK_METHOD2(Kill, bool(int signal, int timeout));
29 MOCK_METHOD1(Reset, void(pid_t)); 31 MOCK_METHOD1(Reset, void(pid_t));
30 MOCK_METHOD1(ResetPidByFile, bool(const std::string& pid_file)); 32 MOCK_METHOD1(ResetPidByFile, bool(const std::string& pid_file));
31 MOCK_METHOD0(Release, pid_t()); 33 MOCK_METHOD0(Release, pid_t());
32 }; 34 };
33 35
34 } // namespace chromeos 36 } // namespace chromeos
35 37
36 #endif // CHROMEOS_PROCESS_MOCK_H_ 38 #endif // CHROMEOS_PROCESS_MOCK_H_
OLDNEW
« no previous file with comments | « chromeos/process.cc ('k') | chromeos/process_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698