OLD | NEW |
1 // Copyright (c) 2010 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_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 |
11 #include "base/basictypes.h" | 11 #include "base/basictypes.h" |
(...skipping 56 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. | |
80 virtual void HandlePolicyResponse( | 78 virtual void HandlePolicyResponse( |
81 const em::DevicePolicyResponse& response) = 0; | 79 const em::DevicePolicyResponse& response) = 0; |
82 virtual void HandleCloudPolicyResponse( | |
83 const em::CloudPolicyResponse& response) = 0; | |
84 virtual void OnError(ErrorCode code) = 0; | 80 virtual void OnError(ErrorCode code) = 0; |
85 | 81 |
86 protected: | 82 protected: |
87 DevicePolicyResponseDelegate() {} | 83 DevicePolicyResponseDelegate() {} |
88 | 84 |
89 private: | 85 private: |
90 DISALLOW_COPY_AND_ASSIGN(DevicePolicyResponseDelegate); | 86 DISALLOW_COPY_AND_ASSIGN(DevicePolicyResponseDelegate); |
91 }; | 87 }; |
92 | 88 |
93 virtual ~DeviceManagementBackend() {} | 89 virtual ~DeviceManagementBackend() {} |
94 | 90 |
95 virtual void ProcessRegisterRequest( | 91 virtual void ProcessRegisterRequest( |
96 const std::string& auth_token, | 92 const std::string& auth_token, |
97 const std::string& device_id, | 93 const std::string& device_id, |
98 const em::DeviceRegisterRequest& request, | 94 const em::DeviceRegisterRequest& request, |
99 DeviceRegisterResponseDelegate* delegate) = 0; | 95 DeviceRegisterResponseDelegate* delegate) = 0; |
100 | 96 |
101 virtual void ProcessUnregisterRequest( | 97 virtual void ProcessUnregisterRequest( |
102 const std::string& device_management_token, | 98 const std::string& device_management_token, |
103 const std::string& device_id, | 99 const std::string& device_id, |
104 const em::DeviceUnregisterRequest& request, | 100 const em::DeviceUnregisterRequest& request, |
105 DeviceUnregisterResponseDelegate* delegate) = 0; | 101 DeviceUnregisterResponseDelegate* delegate) = 0; |
106 | 102 |
107 virtual void ProcessPolicyRequest( | 103 virtual void ProcessPolicyRequest( |
108 const std::string& device_management_token, | 104 const std::string& device_management_token, |
109 const std::string& device_id, | 105 const std::string& device_id, |
110 const em::DevicePolicyRequest& request, | 106 const em::DevicePolicyRequest& request, |
111 DevicePolicyResponseDelegate* delegate) = 0; | 107 DevicePolicyResponseDelegate* delegate) = 0; |
112 | 108 |
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 | |
119 protected: | 109 protected: |
120 DeviceManagementBackend() {} | 110 DeviceManagementBackend() {} |
121 | 111 |
122 private: | 112 private: |
123 DISALLOW_COPY_AND_ASSIGN(DeviceManagementBackend); | 113 DISALLOW_COPY_AND_ASSIGN(DeviceManagementBackend); |
124 }; | 114 }; |
125 | 115 |
126 } // namespace policy | 116 } // namespace policy |
127 | 117 |
128 #endif // CHROME_BROWSER_POLICY_DEVICE_MANAGEMENT_BACKEND_H_ | 118 #endif // CHROME_BROWSER_POLICY_DEVICE_MANAGEMENT_BACKEND_H_ |
OLD | NEW |