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

Side by Side Diff: components/policy/core/common/cloud/cloud_policy_constants.h

Issue 375903002: Fix EnterpriseDeviceManagementStatus UMA enum, add comments. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Cosmetics. Created 6 years, 5 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
« no previous file with comments | « no previous file | components/policy/core/common/cloud/enterprise_metrics.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 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 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 COMPONENTS_POLICY_CORE_COMMON_CLOUD_CLOUD_POLICY_CONSTANTS_H_ 5 #ifndef COMPONENTS_POLICY_CORE_COMMON_CLOUD_CLOUD_POLICY_CONSTANTS_H_
6 #define COMPONENTS_POLICY_CORE_COMMON_CLOUD_CLOUD_POLICY_CONSTANTS_H_ 6 #define COMPONENTS_POLICY_CORE_COMMON_CLOUD_CLOUD_POLICY_CONSTANTS_H_
7 7
8 #include <string> 8 #include <string>
9 #include <utility> 9 #include <utility>
10 10
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 62
63 // Describes the affiliation of a user w.r.t. the device owner. 63 // Describes the affiliation of a user w.r.t. the device owner.
64 enum UserAffiliation { 64 enum UserAffiliation {
65 // User is on the same domain the device was registered with. 65 // User is on the same domain the device was registered with.
66 USER_AFFILIATION_MANAGED, 66 USER_AFFILIATION_MANAGED,
67 // No affiliation between device and user. 67 // No affiliation between device and user.
68 USER_AFFILIATION_NONE, 68 USER_AFFILIATION_NONE,
69 }; 69 };
70 70
71 // Status codes for communication errors with the device management service. 71 // Status codes for communication errors with the device management service.
72 // This enum is used to define the buckets for an enumerated UMA histogram.
73 // Hence,
74 // (a) existing enumerated constants should never be deleted or reordered, and
75 // (b) new constants should only be appended at the end of the enumeration.
72 enum DeviceManagementStatus { 76 enum DeviceManagementStatus {
73 // All is good. 77 // All is good.
74 DM_STATUS_SUCCESS, 78 DM_STATUS_SUCCESS = 0,
75 // Request payload invalid. 79 // Request payload invalid.
76 DM_STATUS_REQUEST_INVALID, 80 DM_STATUS_REQUEST_INVALID = 1,
77 // The HTTP request failed. 81 // The HTTP request failed.
78 DM_STATUS_REQUEST_FAILED, 82 DM_STATUS_REQUEST_FAILED = 2,
79 // The server returned an error code that points to a temporary problem. 83 // The server returned an error code that points to a temporary problem.
80 DM_STATUS_TEMPORARY_UNAVAILABLE, 84 DM_STATUS_TEMPORARY_UNAVAILABLE = 3,
81 // The HTTP request returned a non-success code. 85 // The HTTP request returned a non-success code.
82 DM_STATUS_HTTP_STATUS_ERROR, 86 DM_STATUS_HTTP_STATUS_ERROR = 4,
83 // Response could not be decoded. 87 // Response could not be decoded.
84 DM_STATUS_RESPONSE_DECODING_ERROR, 88 DM_STATUS_RESPONSE_DECODING_ERROR = 5,
85 // Service error: Management not supported. 89 // Service error: Management not supported.
86 DM_STATUS_SERVICE_MANAGEMENT_NOT_SUPPORTED, 90 DM_STATUS_SERVICE_MANAGEMENT_NOT_SUPPORTED = 6,
87 // Service error: Device not found. 91 // Service error: Device not found.
88 DM_STATUS_SERVICE_DEVICE_NOT_FOUND, 92 DM_STATUS_SERVICE_DEVICE_NOT_FOUND = 7,
89 // Service error: Device token invalid. 93 // Service error: Device token invalid.
90 DM_STATUS_SERVICE_MANAGEMENT_TOKEN_INVALID, 94 DM_STATUS_SERVICE_MANAGEMENT_TOKEN_INVALID = 8,
91 // Service error: Activation pending. 95 // Service error: Activation pending.
92 DM_STATUS_SERVICE_ACTIVATION_PENDING, 96 DM_STATUS_SERVICE_ACTIVATION_PENDING = 9,
93 // Service error: The serial number is not valid or not known to the server. 97 // Service error: The serial number is not valid or not known to the server.
94 DM_STATUS_SERVICE_INVALID_SERIAL_NUMBER, 98 DM_STATUS_SERVICE_INVALID_SERIAL_NUMBER = 10,
95 // Service error: The device id used for registration is already taken. 99 // Service error: The device id used for registration is already taken.
96 DM_STATUS_SERVICE_DEVICE_ID_CONFLICT, 100 DM_STATUS_SERVICE_DEVICE_ID_CONFLICT = 11,
97 // Service error: The licenses have expired or have been exhausted. 101 // Service error: The licenses have expired or have been exhausted.
98 DM_STATUS_SERVICE_MISSING_LICENSES, 102 DM_STATUS_SERVICE_MISSING_LICENSES = 12,
99 // Service error: The administrator has deprovisioned this client. 103 // Service error: The administrator has deprovisioned this client.
100 DM_STATUS_SERVICE_DEPROVISIONED, 104 DM_STATUS_SERVICE_DEPROVISIONED = 13,
101 // Service error: Device registration for the wrong domain. 105 // Service error: Device registration for the wrong domain.
102 DM_STATUS_SERVICE_DOMAIN_MISMATCH, 106 DM_STATUS_SERVICE_DOMAIN_MISMATCH = 14,
103 // Service error: Policy not found. Error code defined by the DM folks. 107 // Service error: Policy not found. Error code defined by the DM folks.
104 DM_STATUS_SERVICE_POLICY_NOT_FOUND = 902, 108 DM_STATUS_SERVICE_POLICY_NOT_FOUND = 902,
105 }; 109 };
106 110
107 // List of modes that the device can be locked into. 111 // List of modes that the device can be locked into.
108 enum DeviceMode { 112 enum DeviceMode {
109 DEVICE_MODE_PENDING, // The device mode is not yet available. 113 DEVICE_MODE_PENDING, // The device mode is not yet available.
110 DEVICE_MODE_NOT_SET, // The device is not yet enrolled or owned. 114 DEVICE_MODE_NOT_SET, // The device is not yet enrolled or owned.
111 DEVICE_MODE_CONSUMER, // The device is locally owned as consumer 115 DEVICE_MODE_CONSUMER, // The device is locally owned as consumer
112 // device. 116 // device.
(...skipping 10 matching lines...) Expand all
123 127
124 // Returns the Chrome user policy type to use. This allows overridding the 128 // Returns the Chrome user policy type to use. This allows overridding the
125 // default user policy type on Android and iOS for testing purposes. 129 // default user policy type on Android and iOS for testing purposes.
126 // TODO(joaodasilva): remove this once the server is ready. 130 // TODO(joaodasilva): remove this once the server is ready.
127 // http://crbug.com/248527 131 // http://crbug.com/248527
128 POLICY_EXPORT const char* GetChromeUserPolicyType(); 132 POLICY_EXPORT const char* GetChromeUserPolicyType();
129 133
130 } // namespace policy 134 } // namespace policy
131 135
132 #endif // COMPONENTS_POLICY_CORE_COMMON_CLOUD_CLOUD_POLICY_CONSTANTS_H_ 136 #endif // COMPONENTS_POLICY_CORE_COMMON_CLOUD_CLOUD_POLICY_CONSTANTS_H_
OLDNEW
« no previous file with comments | « no previous file | components/policy/core/common/cloud/enterprise_metrics.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698