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

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

Issue 4967005: No persisted device id/token for unmanaged devices (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 10 years, 1 month 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 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 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 <map> 9 #include <map>
10 #include <string> 10 #include <string>
(...skipping 28 matching lines...) Expand all
39 const em::DeviceUnregisterRequest& request, 39 const em::DeviceUnregisterRequest& request,
40 DeviceUnregisterResponseDelegate* delegate)); 40 DeviceUnregisterResponseDelegate* delegate));
41 41
42 MOCK_METHOD3(ProcessPolicyRequest, void( 42 MOCK_METHOD3(ProcessPolicyRequest, void(
43 const std::string& device_management_token, 43 const std::string& device_management_token,
44 const em::DevicePolicyRequest& request, 44 const em::DevicePolicyRequest& request,
45 DevicePolicyResponseDelegate* delegate)); 45 DevicePolicyResponseDelegate* delegate));
46 46
47 void AllShouldSucceed(); 47 void AllShouldSucceed();
48 void AllShouldFail(); 48 void AllShouldFail();
49 void UnmanagedDevice();
49 50
50 void SimulateSuccessfulRegisterRequest( 51 void SimulateSuccessfulRegisterRequest(
51 const std::string& auth_token, 52 const std::string& auth_token,
52 const std::string& device_id, 53 const std::string& device_id,
53 const em::DeviceRegisterRequest& request, 54 const em::DeviceRegisterRequest& request,
54 DeviceRegisterResponseDelegate* delegate); 55 DeviceRegisterResponseDelegate* delegate);
55 56
56 void SimulateSuccessfulPolicyRequest( 57 void SimulateSuccessfulPolicyRequest(
57 const std::string& device_management_token, 58 const std::string& device_management_token,
58 const em::DevicePolicyRequest& request, 59 const em::DevicePolicyRequest& request,
59 DevicePolicyResponseDelegate* delegate); 60 DevicePolicyResponseDelegate* delegate);
60 61
61 void SimulateFailedRegisterRequest( 62 void SimulateFailedRegisterRequest(
62 const std::string& auth_token, 63 const std::string& auth_token,
63 const std::string& device_id, 64 const std::string& device_id,
64 const em::DeviceRegisterRequest& request, 65 const em::DeviceRegisterRequest& request,
65 DeviceRegisterResponseDelegate* delegate); 66 DeviceRegisterResponseDelegate* delegate);
66 67
67 void SimulateFailedPolicyRequest( 68 void SimulateFailedPolicyRequest(
68 const std::string& device_management_token, 69 const std::string& device_management_token,
69 const em::DevicePolicyRequest& request, 70 const em::DevicePolicyRequest& request,
70 DevicePolicyResponseDelegate* delegate); 71 DevicePolicyResponseDelegate* delegate);
71 72
73 void SimulateUnmanagedRegisterRequest(
74 const std::string& auth_token,
75 const std::string& device_id,
76 const em::DeviceRegisterRequest& request,
77 DeviceRegisterResponseDelegate* delegate);
78
72 void AddBooleanPolicy(const char* policy_name, bool value); 79 void AddBooleanPolicy(const char* policy_name, bool value);
73 80
74 private: 81 private:
75 em::DevicePolicyResponse policy_response_; 82 em::DevicePolicyResponse policy_response_;
76 em::DevicePolicySetting* policy_setting_; 83 em::DevicePolicySetting* policy_setting_;
77 84
78 DISALLOW_COPY_AND_ASSIGN(MockDeviceManagementBackend); 85 DISALLOW_COPY_AND_ASSIGN(MockDeviceManagementBackend);
79 }; 86 };
80 87
81 } // namespace policy 88 } // namespace policy
82 89
83 #endif // CHROME_BROWSER_POLICY_MOCK_DEVICE_MANAGEMENT_BACKEND_H_ 90 #endif // CHROME_BROWSER_POLICY_MOCK_DEVICE_MANAGEMENT_BACKEND_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698