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

Side by Side Diff: mock_device_policy.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: 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
OLDNEW
1 // Copyright (c) 2010 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_DEVICE_POLICY_H_ 5 #ifndef LOGIN_MANAGER_MOCK_DEVICE_POLICY_H_
6 #define LOGIN_MANAGER_MOCK_DEVICE_POLICY_H_ 6 #define LOGIN_MANAGER_MOCK_DEVICE_POLICY_H_
7 7
8 #include "login_manager/device_policy.h" 8 #include "login_manager/device_policy.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 login_manager { 13 namespace login_manager {
14 class MockDevicePolicy : public DevicePolicy { 14 class MockDevicePolicy : public DevicePolicy {
15 public: 15 public:
16 MockDevicePolicy() : DevicePolicy(FilePath("")) {} 16 MockDevicePolicy() : DevicePolicy(FilePath("")) {}
17 virtual ~MockDevicePolicy() {} 17 virtual ~MockDevicePolicy() {}
18 MOCK_METHOD0(LoadOrCreate, bool(void)); 18 MOCK_METHOD0(LoadOrCreate, bool(void));
19 MOCK_METHOD0(Persist, bool(void)); 19 MOCK_METHOD0(Persist, bool(void));
20 MOCK_CONST_METHOD1(Get, bool(std::string*)); 20 MOCK_CONST_METHOD0(Get, const enterprise_management::PolicyFetchResponse&());
21 MOCK_CONST_METHOD1(SerializeToString, bool(std::string*));
21 MOCK_METHOD1(Set, void(const enterprise_management::PolicyFetchResponse&)); 22 MOCK_METHOD1(Set, void(const enterprise_management::PolicyFetchResponse&));
22 }; 23 };
23 } // namespace login_manager 24 } // namespace login_manager
24 25
25 #endif // LOGIN_MANAGER_MOCK_DEVICE_POLICY_H_ 26 #endif // LOGIN_MANAGER_MOCK_DEVICE_POLICY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698