OLD | NEW |
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_DEVICE_MANAGEMENT_BACKEND_H_ | 5 #ifndef CHROME_BROWSER_POLICY_DEVICE_MANAGEMENT_BACKEND_H_ |
6 #define CHROME_BROWSER_POLICY_DEVICE_MANAGEMENT_BACKEND_H_ | 6 #define CHROME_BROWSER_POLICY_DEVICE_MANAGEMENT_BACKEND_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
68 DeviceUnregisterResponseDelegate() {} | 68 DeviceUnregisterResponseDelegate() {} |
69 | 69 |
70 private: | 70 private: |
71 DISALLOW_COPY_AND_ASSIGN(DeviceUnregisterResponseDelegate); | 71 DISALLOW_COPY_AND_ASSIGN(DeviceUnregisterResponseDelegate); |
72 }; | 72 }; |
73 | 73 |
74 class DevicePolicyResponseDelegate { | 74 class DevicePolicyResponseDelegate { |
75 public: | 75 public: |
76 virtual ~DevicePolicyResponseDelegate() {} | 76 virtual ~DevicePolicyResponseDelegate() {} |
77 | 77 |
| 78 // Deprecated in favor of HandleCloudPolicyResponse. To be removed once |
| 79 // DMServer supports the new protocol. |
78 virtual void HandlePolicyResponse( | 80 virtual void HandlePolicyResponse( |
79 const em::DevicePolicyResponse& response) = 0; | 81 const em::DevicePolicyResponse& response) = 0; |
| 82 virtual void HandleCloudPolicyResponse( |
| 83 const em::CloudPolicyResponse& response) = 0; |
80 virtual void OnError(ErrorCode code) = 0; | 84 virtual void OnError(ErrorCode code) = 0; |
81 | 85 |
82 protected: | 86 protected: |
83 DevicePolicyResponseDelegate() {} | 87 DevicePolicyResponseDelegate() {} |
84 | 88 |
85 private: | 89 private: |
86 DISALLOW_COPY_AND_ASSIGN(DevicePolicyResponseDelegate); | 90 DISALLOW_COPY_AND_ASSIGN(DevicePolicyResponseDelegate); |
87 }; | 91 }; |
88 | 92 |
89 virtual ~DeviceManagementBackend() {} | 93 virtual ~DeviceManagementBackend() {} |
90 | 94 |
91 virtual void ProcessRegisterRequest( | 95 virtual void ProcessRegisterRequest( |
92 const std::string& auth_token, | 96 const std::string& auth_token, |
93 const std::string& device_id, | 97 const std::string& device_id, |
94 const em::DeviceRegisterRequest& request, | 98 const em::DeviceRegisterRequest& request, |
95 DeviceRegisterResponseDelegate* delegate) = 0; | 99 DeviceRegisterResponseDelegate* delegate) = 0; |
96 | 100 |
97 virtual void ProcessUnregisterRequest( | 101 virtual void ProcessUnregisterRequest( |
98 const std::string& device_management_token, | 102 const std::string& device_management_token, |
99 const std::string& device_id, | 103 const std::string& device_id, |
100 const em::DeviceUnregisterRequest& request, | 104 const em::DeviceUnregisterRequest& request, |
101 DeviceUnregisterResponseDelegate* delegate) = 0; | 105 DeviceUnregisterResponseDelegate* delegate) = 0; |
102 | 106 |
103 virtual void ProcessPolicyRequest( | 107 virtual void ProcessPolicyRequest( |
104 const std::string& device_management_token, | 108 const std::string& device_management_token, |
105 const std::string& device_id, | 109 const std::string& device_id, |
106 const em::DevicePolicyRequest& request, | 110 const em::DevicePolicyRequest& request, |
107 DevicePolicyResponseDelegate* delegate) = 0; | 111 DevicePolicyResponseDelegate* delegate) = 0; |
108 | 112 |
| 113 virtual void ProcessCloudPolicyRequest( |
| 114 const std::string& device_management_token, |
| 115 const std::string& device_id, |
| 116 const em::CloudPolicyRequest& request, |
| 117 DevicePolicyResponseDelegate* delegate) = 0; |
| 118 |
109 protected: | 119 protected: |
110 DeviceManagementBackend() {} | 120 DeviceManagementBackend() {} |
111 | 121 |
112 private: | 122 private: |
113 DISALLOW_COPY_AND_ASSIGN(DeviceManagementBackend); | 123 DISALLOW_COPY_AND_ASSIGN(DeviceManagementBackend); |
114 }; | 124 }; |
115 | 125 |
116 } // namespace policy | 126 } // namespace policy |
117 | 127 |
118 #endif // CHROME_BROWSER_POLICY_DEVICE_MANAGEMENT_BACKEND_H_ | 128 #endif // CHROME_BROWSER_POLICY_DEVICE_MANAGEMENT_BACKEND_H_ |
OLD | NEW |