Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(164)

Side by Side Diff: chrome/browser/policy/cloud_policy_constants.h

Issue 8952027: base::Callback-ify policy::DeviceManagementService. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: address comments. Created 8 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/policy/cloud_policy_constants.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
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 PolicyFetchResponse.
39 enum PolicyFetchStatus {
40 POLICY_FETCH_SUCCESS = 200,
41 POLICY_FETCH_ERROR_NOT_FOUND = 902,
42 };
43
44 } // namespace dm_protocol
45
46 // Describes the affiliation of a user w.r.t. the device owner.
47 enum UserAffiliation {
48 // User is on the same domain the device was registered with.
49 USER_AFFILIATION_MANAGED,
50 // No affiliation between device and user.
51 USER_AFFILIATION_NONE,
52 };
53
54 // Status codes for communication errors with the device management service.
55 enum DeviceManagementStatus {
56 // All is good.
57 DM_STATUS_SUCCESS,
58 // Request payload invalid.
59 DM_STATUS_REQUEST_INVALID,
60 // The HTTP request failed.
61 DM_STATUS_REQUEST_FAILED,
62 // The server returned an error code that points to a temporary problem.
63 DM_STATUS_TEMPORARY_UNAVAILABLE,
64 // The HTTP request returned a non-success code.
65 DM_STATUS_HTTP_STATUS_ERROR,
66 // Response could not be decoded.
67 DM_STATUS_RESPONSE_DECODING_ERROR,
68 // Service error: Management not supported.
69 DM_STATUS_SERVICE_MANAGEMENT_NOT_SUPPORTED,
70 // Service error: Device not found.
71 DM_STATUS_SERVICE_DEVICE_NOT_FOUND,
72 // Service error: Device token invalid.
73 DM_STATUS_SERVICE_MANAGEMENT_TOKEN_INVALID,
74 // Service error: Activation pending.
75 DM_STATUS_SERVICE_ACTIVATION_PENDING,
76 // Service error: The serial number is not valid or not known to the server.
77 DM_STATUS_SERVICE_INVALID_SERIAL_NUMBER,
78 // Service error: The device id used for registration is already taken.
79 DM_STATUS_SERVICE_DEVICE_ID_CONFLICT,
80 // Service error: Policy not found. Error code defined by the DM folks.
81 DM_STATUS_SERVICE_POLICY_NOT_FOUND = 902,
82 };
83
84 } // namespace policy
85
86 #endif // CHROME_BROWSER_POLICY_CLOUD_POLICY_CONSTANTS_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/policy/cloud_policy_constants.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698