Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | |
|
Joao da Silva
2012/01/02 16:14:43
2012
Mattias Nissler (ping if slow)
2012/01/02 17:53:23
Done.
| |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef CHROME_BROWSER_POLICY_CLOUD_POLICY_CONSTANTS_H_ | |
| 6 #define CHROME_BROWSER_POLICY_CLOUD_POLICY_CONSTANTS_H_ | |
| 7 #pragma once | |
| 8 | |
| 9 namespace policy { | |
| 10 | |
| 11 // Constants related to the device management protocol. | |
| 12 namespace dm_protocol { | |
| 13 | |
| 14 // Name extern constants for URL query parameters. | |
| 15 extern const char kParamAgent[]; | |
| 16 extern const char kParamAppType[]; | |
| 17 extern const char kParamDeviceID[]; | |
| 18 extern const char kParamDeviceType[]; | |
| 19 extern const char kParamOAuthToken[]; | |
| 20 extern const char kParamPlatform[]; | |
| 21 extern const char kParamRequest[]; | |
| 22 extern const char kParamUserAffiliation[]; | |
| 23 | |
| 24 // String extern constants for the device and app type we report to the server. | |
| 25 extern const char kValueAppType[]; | |
| 26 extern const char kValueDeviceType[]; | |
| 27 extern const char kValueRequestAutoEnrollment[]; | |
| 28 extern const char kValueRequestPolicy[]; | |
| 29 extern const char kValueRequestRegister[]; | |
| 30 extern const char kValueRequestUnregister[]; | |
| 31 extern const char kValueUserAffiliationManaged[]; | |
| 32 extern const char kValueUserAffiliationNone[]; | |
| 33 | |
| 34 // Policy type strings for the policy_type field in PolicyFetchRequest. | |
| 35 extern const char kChromeDevicePolicyType[]; | |
| 36 extern const char kChromeUserPolicyType[]; | |
| 37 | |
| 38 // These codes are sent in the |error_code| field of the the | |
|
Joao da Silva
2012/01/02 16:14:43
the the -> the
Mattias Nissler (ping if slow)
2012/01/02 17:53:23
Done.
| |
| 39 // PolicyFetchResponse protobuf. | |
| 40 enum PolicyFetchStatus { | |
| 41 POLICY_FETCH_SUCCESS = 200, | |
| 42 POLICY_FETCH_ERROR_NOT_FOUND = 902 | |
|
Joao da Silva
2012/01/02 16:14:43
The other 2 enums have commas after the last entry
Mattias Nissler (ping if slow)
2012/01/02 17:53:23
Done.
| |
| 43 }; | |
| 44 | |
| 45 } // namespace dm_protocol | |
| 46 | |
| 47 // Describes the affiliation of a user w.r.t. the device owner. | |
| 48 enum UserAffiliation { | |
|
Joao da Silva
2012/01/02 16:14:43
I assume this is removed from the CloudPolicyDataS
Mattias Nissler (ping if slow)
2012/01/02 17:53:23
Yes, see cleanup CL: http://codereview.chromium.or
| |
| 49 // User is on the same domain the device was registered with. | |
| 50 USER_AFFILIATION_MANAGED, | |
| 51 // No affiliation between device and user. | |
| 52 USER_AFFILIATION_NONE, | |
| 53 }; | |
| 54 | |
| 55 // Status codes for communication errors with the device management service. | |
| 56 enum DeviceManagementStatus { | |
| 57 // All is good. | |
| 58 DM_STATUS_SUCCESS, | |
| 59 // Request payload invalid. | |
| 60 DM_STATUS_REQUEST_INVALID, | |
| 61 // The HTTP request failed. | |
| 62 DM_STATUS_REQUEST_FAILED, | |
| 63 // The server returned an error code that points to a temporary problem. | |
| 64 DM_STATUS_TEMPORARY_UNAVAILABLE, | |
| 65 // The HTTP request returned a non-success code. | |
| 66 DM_STATUS_HTTP_STATUS_ERROR, | |
| 67 // Response could not be decoded. | |
| 68 DM_STATUS_RESPONSE_DECODING_ERROR, | |
| 69 // Service error: Management not supported. | |
| 70 DM_STATUS_SERVICE_MANAGEMENT_NOT_SUPPORTED, | |
| 71 // Service error: Device not found. | |
| 72 DM_STATUS_SERVICE_DEVICE_NOT_FOUND, | |
| 73 // Service error: Device token invalid. | |
| 74 DM_STATUS_SERVICE_MANAGEMENT_TOKEN_INVALID, | |
| 75 // Service error: Activation pending. | |
| 76 DM_STATUS_SERVICE_ACTIVATION_PENDING, | |
| 77 // Service error: The serial number is not valid or not known to the server. | |
| 78 DM_STATUS_SERVICE_INVALID_SERIAL_NUMBER, | |
| 79 // Service error: The device id used for registration is already taken. | |
| 80 DM_STATUS_SERVICE_DEVICE_ID_CONFLICT, | |
| 81 // Service error: Policy not found. Error code defined by the DM folks. | |
| 82 DM_STATUS_SERVICE_POLICY_NOT_FOUND = 902, | |
| 83 }; | |
| 84 | |
| 85 } // namespace policy | |
| 86 | |
| 87 #endif // CHROME_BROWSER_POLICY_CLOUD_POLICY_CONSTANTS_H_ | |
| OLD | NEW |