OLD | NEW |
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_DEVICE_MANAGEMENT_BACKEND_IMPL_H_ | 5 #ifndef CHROME_BROWSER_POLICY_DEVICE_MANAGEMENT_BACKEND_IMPL_H_ |
6 #define CHROME_BROWSER_POLICY_DEVICE_MANAGEMENT_BACKEND_IMPL_H_ | 6 #define CHROME_BROWSER_POLICY_DEVICE_MANAGEMENT_BACKEND_IMPL_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <set> | 9 #include <set> |
10 #include <string> | 10 #include <string> |
(...skipping 22 matching lines...) Expand all Loading... |
33 static const char kParamDeviceID[]; | 33 static const char kParamDeviceID[]; |
34 static const char kParamDeviceType[]; | 34 static const char kParamDeviceType[]; |
35 static const char kParamOAuthToken[]; | 35 static const char kParamOAuthToken[]; |
36 static const char kParamPlatform[]; | 36 static const char kParamPlatform[]; |
37 static const char kParamRequest[]; | 37 static const char kParamRequest[]; |
38 static const char kParamUserAffiliation[]; | 38 static const char kParamUserAffiliation[]; |
39 | 39 |
40 // String constants for the device and app type we report to the server. | 40 // String constants for the device and app type we report to the server. |
41 static const char kValueAppType[]; | 41 static const char kValueAppType[]; |
42 static const char kValueDeviceType[]; | 42 static const char kValueDeviceType[]; |
| 43 static const char kValueRequestAutoEnrollment[]; |
43 static const char kValueRequestPolicy[]; | 44 static const char kValueRequestPolicy[]; |
44 static const char kValueRequestRegister[]; | 45 static const char kValueRequestRegister[]; |
45 static const char kValueRequestUnregister[]; | 46 static const char kValueRequestUnregister[]; |
46 static const char kValueUserAffiliationManaged[]; | 47 static const char kValueUserAffiliationManaged[]; |
47 static const char kValueUserAffiliationNone[]; | 48 static const char kValueUserAffiliationNone[]; |
48 | 49 |
49 private: | 50 private: |
50 friend class DeviceManagementJobBase; | 51 friend class DeviceManagementJobBase; |
51 | 52 |
52 typedef std::set<DeviceManagementJobBase*> JobSet; | 53 typedef std::set<DeviceManagementJobBase*> JobSet; |
(...skipping 16 matching lines...) Expand all Loading... |
69 const std::string& device_management_token, | 70 const std::string& device_management_token, |
70 const std::string& device_id, | 71 const std::string& device_id, |
71 const em::DeviceUnregisterRequest& request, | 72 const em::DeviceUnregisterRequest& request, |
72 DeviceUnregisterResponseDelegate* response_delegate) OVERRIDE; | 73 DeviceUnregisterResponseDelegate* response_delegate) OVERRIDE; |
73 virtual void ProcessPolicyRequest( | 74 virtual void ProcessPolicyRequest( |
74 const std::string& device_management_token, | 75 const std::string& device_management_token, |
75 const std::string& device_id, | 76 const std::string& device_id, |
76 CloudPolicyDataStore::UserAffiliation affiliation, | 77 CloudPolicyDataStore::UserAffiliation affiliation, |
77 const em::DevicePolicyRequest& request, | 78 const em::DevicePolicyRequest& request, |
78 DevicePolicyResponseDelegate* response_delegate) OVERRIDE; | 79 DevicePolicyResponseDelegate* response_delegate) OVERRIDE; |
| 80 virtual void ProcessAutoEnrollmentRequest( |
| 81 const std::string& device_id, |
| 82 const em::DeviceAutoEnrollmentRequest& request, |
| 83 DeviceAutoEnrollmentResponseDelegate* delegate) OVERRIDE; |
79 | 84 |
80 // Converts a user affiliation to the appropriate query parameter value. | 85 // Converts a user affiliation to the appropriate query parameter value. |
81 static const char* UserAffiliationToString( | 86 static const char* UserAffiliationToString( |
82 CloudPolicyDataStore::UserAffiliation affiliation); | 87 CloudPolicyDataStore::UserAffiliation affiliation); |
83 | 88 |
84 // Keeps track of the jobs currently in flight. | 89 // Keeps track of the jobs currently in flight. |
85 JobSet pending_jobs_; | 90 JobSet pending_jobs_; |
86 | 91 |
87 DeviceManagementService* service_; | 92 DeviceManagementService* service_; |
88 | 93 |
89 DISALLOW_COPY_AND_ASSIGN(DeviceManagementBackendImpl); | 94 DISALLOW_COPY_AND_ASSIGN(DeviceManagementBackendImpl); |
90 }; | 95 }; |
91 | 96 |
92 } // namespace policy | 97 } // namespace policy |
93 | 98 |
94 #endif // CHROME_BROWSER_POLICY_DEVICE_MANAGEMENT_BACKEND_IMPL_H_ | 99 #endif // CHROME_BROWSER_POLICY_DEVICE_MANAGEMENT_BACKEND_IMPL_H_ |
OLD | NEW |