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

Side by Side Diff: chrome/browser/policy/mock_device_management_backend.h

Issue 8741014: Added auto-enrollment request support to the device_management_backend. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased Created 9 years 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 CHROME_BROWSER_POLICY_MOCK_DEVICE_MANAGEMENT_BACKEND_H_ 5 #ifndef CHROME_BROWSER_POLICY_MOCK_DEVICE_MANAGEMENT_BACKEND_H_
6 #define CHROME_BROWSER_POLICY_MOCK_DEVICE_MANAGEMENT_BACKEND_H_ 6 #define CHROME_BROWSER_POLICY_MOCK_DEVICE_MANAGEMENT_BACKEND_H_
7 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 10
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 const em::DeviceUnregisterRequest& request, 42 const em::DeviceUnregisterRequest& request,
43 DeviceUnregisterResponseDelegate* delegate)); 43 DeviceUnregisterResponseDelegate* delegate));
44 44
45 MOCK_METHOD5(ProcessPolicyRequest, void( 45 MOCK_METHOD5(ProcessPolicyRequest, void(
46 const std::string& device_management_token, 46 const std::string& device_management_token,
47 const std::string& device_id, 47 const std::string& device_id,
48 CloudPolicyDataStore::UserAffiliation affiliation, 48 CloudPolicyDataStore::UserAffiliation affiliation,
49 const em::DevicePolicyRequest& request, 49 const em::DevicePolicyRequest& request,
50 DevicePolicyResponseDelegate* delegate)); 50 DevicePolicyResponseDelegate* delegate));
51 51
52 MOCK_METHOD3(ProcessAutoEnrollmentRequest, void(
53 const std::string& device_id,
54 const em::DeviceAutoEnrollmentRequest& request,
55 DeviceAutoEnrollmentResponseDelegate* delegate));
56
52 private: 57 private:
53 DISALLOW_COPY_AND_ASSIGN(MockDeviceManagementBackend); 58 DISALLOW_COPY_AND_ASSIGN(MockDeviceManagementBackend);
54 }; 59 };
55 60
56 ACTION(MockDeviceManagementBackendSucceedRegister) { 61 ACTION(MockDeviceManagementBackendSucceedRegister) {
57 em::DeviceRegisterResponse response; 62 em::DeviceRegisterResponse response;
58 std::string token("FAKE_DEVICE_TOKEN_"); 63 std::string token("FAKE_DEVICE_TOKEN_");
59 static int next_token_suffix; 64 static int next_token_suffix;
60 token += next_token_suffix++; 65 token += next_token_suffix++;
61 response.set_device_management_token(token); 66 response.set_device_management_token(token);
(...skipping 27 matching lines...) Expand all
89 arg4->OnError(error); 94 arg4->OnError(error);
90 } 95 }
91 96
92 ACTION_P(MockDeviceManagementBackendFailPolicy, error) { 97 ACTION_P(MockDeviceManagementBackendFailPolicy, error) {
93 arg4->OnError(error); 98 arg4->OnError(error);
94 } 99 }
95 100
96 } // namespace policy 101 } // namespace policy
97 102
98 #endif // CHROME_BROWSER_POLICY_MOCK_DEVICE_MANAGEMENT_BACKEND_H_ 103 #endif // CHROME_BROWSER_POLICY_MOCK_DEVICE_MANAGEMENT_BACKEND_H_
OLDNEW
« no previous file with comments | « chrome/browser/policy/device_management_service_unittest.cc ('k') | chrome/browser/policy/mock_device_management_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698