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

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

Issue 7105018: UMA metrics for cloud policies. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix win build, rebased Created 9 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 | Annotate | Revision Log
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_POLICY_ENTERPRISE_METRICS_H_
6 #define CHROME_BROWSER_POLICY_ENTERPRISE_METRICS_H_
7 #pragma once
8
9 namespace policy {
10
11 // Metrics collected for enterprise events.
12
13 // Events related to fetching, saving and loading DM server tokens.
14 // These metrics are collected both for device and user tokens.
15 enum MetricToken {
16 // A cached token was successfully loaded from disk.
17 kMetricTokenLoadSucceeded = 0,
18 // Reading a cached token from disk failed.
19 kMetricTokenLoadFailed,
20
21 // A token fetch request was sent to the DM server.
22 kMetricTokenFetchRequested,
23 // The request was invalid, or the HTTP request failed.
24 kMetricTokenFetchRequestFailed,
25 // Error HTTP status received, or the DM server failed in another way.
26 kMetricTokenFetchServerFailed,
27 // A response to the fetch request was received.
28 kMetricTokenFetchResponseReceived,
29 // The response received was invalid. This happens when some expected data
30 // was not present in the response.
31 kMetricTokenFetchBadResponse,
32 // DM server reported that management is not supported.
33 kMetricTokenFetchManagementNotSupported,
34 // DM server reported that the given device ID was not found.
35 kMetricTokenFetchDeviceNotFound,
36 // DM token successfully retrieved.
37 kMetricTokenFetchOK,
38
39 // Successfully cached a token to disk.
40 kMetricTokenStoreSucceeded,
41 // Caching a token to disk failed.
42 kMetricTokenStoreFailed,
43
44 kMetricTokenSize // Must be the last.
45 };
46
47 // Events related to fetching, saving and loading user and device policies.
48 enum MetricPolicy {
49 // A cached policy was successfully loaded from disk.
50 kMetricPolicyLoadSucceeded = 0,
51 // Reading a cached policy from disk failed.
52 kMetricPolicyLoadFailed,
53
54 // A policy fetch request was sent to the DM server.
55 kMetricPolicyFetchRequested,
56 // The request was invalid, or the HTTP request failed.
57 kMetricPolicyFetchRequestFailed,
58 // Error HTTP status received, or the DM server failed in another way.
59 kMetricPolicyFetchServerFailed,
60 // Policy not found for the given user or device.
61 kMetricPolicyFetchNotFound,
62 // DM server didn't accept the token used in the request.
63 kMetricPolicyFetchInvalidToken,
64 // A response to the policy fetch request was received.
65 kMetricPolicyFetchResponseReceived,
66 // The policy response message didn't contain a policy, or other data was
67 // missing.
68 kMetricPolicyFetchBadResponse,
69 // Failed to decode the policy.
70 kMetricPolicyFetchInvalidPolicy,
71 // The device policy was rejected because its signature was invalid.
72 kMetricPolicyFetchBadSignature,
73 // Rejected policy because its timestamp is in the future.
74 kMetricPolicyFetchTimestampInFuture,
75 // Device policy rejected because the device is not managed.
76 kMetricPolicyFetchNonEnterpriseDevice,
77 // The policy was provided for a username that is different from the device
78 // owner, and the policy was rejected.
79 kMetricPolicyFetchUserMismatch,
80 // The policy was rejected for another reason. Currently this can happen
81 // only for device policies, when the SignedSettings fail to store or retrieve
82 // a stored policy.
83 kMetricPolicyFetchOtherFailed,
84 // The fetched policy was accepted.
85 kMetricPolicyFetchOK,
86 // The policy just fetched didn't have any changes compared to the cached
87 // policy.
88 kMetricPolicyFetchNotModified,
89
90 // Successfully cached a policy to disk.
91 kMetricPolicyStoreSucceeded,
92 // Caching a policy to disk failed.
93 kMetricPolicyStoreFailed,
94
95 kMetricPolicySize // Must be the last.
96 };
97
98 // Events related to device enrollment.
99 enum MetricEnrollment {
100 // The enrollment screen was closed without completing the enrollment
101 // process.
102 kMetricEnrollmentCancelled = 0,
103 // The user submitted credentials and started the enrollment process.
104 kMetricEnrollmentStarted,
105 // Enrollment failed due to a network error.
106 kMetricEnrollmentNetworkFailed,
107 // Enrollment failed because logging in to Gaia failed.
108 kMetricEnrollmentLoginFailed,
109 // Enrollment failed because it is not supported for the account used.
110 kMetricEnrollmentNotSupported,
111 // Enrollment failed because it failed to apply device policy.
112 kMetricEnrollmentPolicyFailed,
113 // Enrollment failed due to an unexpected error. This currently happens when
114 // the Gaia auth token is not issued for the DM service, the device cloud
115 // policy subsystem isn't initialized, or when fetching Gaia tokens fails
116 // for an unknown reason.
117 kMetricEnrollmentOtherFailed,
118 // Enrollment was successful.
119 kMetricEnrollmentOK,
120
121 kMetricEnrollmentSize // Must be the last.
122 };
123
124 // Names for the UMA counters. They are shared from here since the events
125 // from the same enum above can be triggered in different files, and must use
126 // the same UMA histogram name.
127 extern const char* kMetricToken;
128 extern const char* kMetricPolicy;
129 extern const char* kMetricEnrollment;
130
131 } // namespace policy
132
133 #endif // CHROME_BROWSER_POLICY_ENTERPRISE_METRICS_H_
OLDNEW
« no previous file with comments | « chrome/browser/policy/device_token_fetcher.cc ('k') | chrome/browser/policy/enterprise_metrics.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698