Chromium Code Reviews| Index: chrome/browser/policy/cloud_policy_constants.h |
| diff --git a/chrome/browser/policy/cloud_policy_constants.h b/chrome/browser/policy/cloud_policy_constants.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..be5a93577a6f5e96e7069771e7026d10372c9b02 |
| --- /dev/null |
| +++ b/chrome/browser/policy/cloud_policy_constants.h |
| @@ -0,0 +1,87 @@ |
| +// 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.
|
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef CHROME_BROWSER_POLICY_CLOUD_POLICY_CONSTANTS_H_ |
| +#define CHROME_BROWSER_POLICY_CLOUD_POLICY_CONSTANTS_H_ |
| +#pragma once |
| + |
| +namespace policy { |
| + |
| +// Constants related to the device management protocol. |
| +namespace dm_protocol { |
| + |
| +// Name extern constants for URL query parameters. |
| +extern const char kParamAgent[]; |
| +extern const char kParamAppType[]; |
| +extern const char kParamDeviceID[]; |
| +extern const char kParamDeviceType[]; |
| +extern const char kParamOAuthToken[]; |
| +extern const char kParamPlatform[]; |
| +extern const char kParamRequest[]; |
| +extern const char kParamUserAffiliation[]; |
| + |
| +// String extern constants for the device and app type we report to the server. |
| +extern const char kValueAppType[]; |
| +extern const char kValueDeviceType[]; |
| +extern const char kValueRequestAutoEnrollment[]; |
| +extern const char kValueRequestPolicy[]; |
| +extern const char kValueRequestRegister[]; |
| +extern const char kValueRequestUnregister[]; |
| +extern const char kValueUserAffiliationManaged[]; |
| +extern const char kValueUserAffiliationNone[]; |
| + |
| +// Policy type strings for the policy_type field in PolicyFetchRequest. |
| +extern const char kChromeDevicePolicyType[]; |
| +extern const char kChromeUserPolicyType[]; |
| + |
| +// 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.
|
| +// PolicyFetchResponse protobuf. |
| +enum PolicyFetchStatus { |
| + POLICY_FETCH_SUCCESS = 200, |
| + 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.
|
| +}; |
| + |
| +} // namespace dm_protocol |
| + |
| +// Describes the affiliation of a user w.r.t. the device owner. |
| +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
|
| + // User is on the same domain the device was registered with. |
| + USER_AFFILIATION_MANAGED, |
| + // No affiliation between device and user. |
| + USER_AFFILIATION_NONE, |
| +}; |
| + |
| +// Status codes for communication errors with the device management service. |
| +enum DeviceManagementStatus { |
| + // All is good. |
| + DM_STATUS_SUCCESS, |
| + // Request payload invalid. |
| + DM_STATUS_REQUEST_INVALID, |
| + // The HTTP request failed. |
| + DM_STATUS_REQUEST_FAILED, |
| + // The server returned an error code that points to a temporary problem. |
| + DM_STATUS_TEMPORARY_UNAVAILABLE, |
| + // The HTTP request returned a non-success code. |
| + DM_STATUS_HTTP_STATUS_ERROR, |
| + // Response could not be decoded. |
| + DM_STATUS_RESPONSE_DECODING_ERROR, |
| + // Service error: Management not supported. |
| + DM_STATUS_SERVICE_MANAGEMENT_NOT_SUPPORTED, |
| + // Service error: Device not found. |
| + DM_STATUS_SERVICE_DEVICE_NOT_FOUND, |
| + // Service error: Device token invalid. |
| + DM_STATUS_SERVICE_MANAGEMENT_TOKEN_INVALID, |
| + // Service error: Activation pending. |
| + DM_STATUS_SERVICE_ACTIVATION_PENDING, |
| + // Service error: The serial number is not valid or not known to the server. |
| + DM_STATUS_SERVICE_INVALID_SERIAL_NUMBER, |
| + // Service error: The device id used for registration is already taken. |
| + DM_STATUS_SERVICE_DEVICE_ID_CONFLICT, |
| + // Service error: Policy not found. Error code defined by the DM folks. |
| + DM_STATUS_SERVICE_POLICY_NOT_FOUND = 902, |
| +}; |
| + |
| +} // namespace policy |
| + |
| +#endif // CHROME_BROWSER_POLICY_CLOUD_POLICY_CONSTANTS_H_ |