Chromium Code Reviews| OLD | NEW |
|---|---|
| (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 enterprise_management { | |
|
gfeher
2011/06/28 09:58:58
This namespace is so far only used for protobuf ge
Joao da Silva
2011/06/30 12:57:00
Agree, refactored as per your second suggestion.
| |
| 10 | |
| 11 // Defines the metrics collected for enterprise events, and provides | |
| 12 // functions to collect them. | |
| 13 | |
| 14 enum TokenOperationResult { | |
| 15 kTokenLoadRequested = 0, | |
| 16 kTokenLoadFailed, | |
|
kmixter1
2011/06/28 01:06:02
If not here, somewhere, it would be good to commen
Joao da Silva
2011/06/30 12:57:00
I've added a comment to each count, explaining whe
| |
| 17 | |
| 18 kTokenFetchRequested, | |
| 19 kTokenFetchRequestFailed, | |
| 20 kTokenFetchServerFailed, | |
| 21 kTokenFetchResponseReceived, | |
| 22 kTokenFetchBadResponse, | |
| 23 kTokenFetchManagementNotSupported, | |
| 24 kTokenFetchDeviceNotFound, | |
| 25 kTokenFetchOK, | |
| 26 | |
| 27 kTokenStoreRequested, | |
| 28 kTokenStoreFailed, | |
| 29 | |
| 30 kTokenOperationsSize // Must be the last. | |
| 31 }; | |
| 32 | |
| 33 enum PolicyOperationResult { | |
| 34 kPolicyLoadRequested = 0, | |
| 35 kPolicyLoadFailed, | |
| 36 | |
| 37 kPolicyFetchRequested, | |
| 38 kPolicyFetchRequestFailed, | |
| 39 kPolicyFetchServerFailed, | |
| 40 kPolicyFetchNotFound, | |
| 41 kPolicyFetchResponseReceived, | |
| 42 kPolicyFetchBadResponse, | |
| 43 kPolicyFetchInvalidToken, | |
| 44 kPolicyFetchInvalidPolicy, | |
| 45 kPolicyFetchBadSignature, | |
| 46 kPolicyFetchTimestampInFuture, | |
| 47 kPolicyFetchNonEnterpriseDevice, | |
| 48 kPolicyFetchUserMismatch, | |
| 49 kPolicyFetchOtherFailed, | |
| 50 kPolicyFetchOK, | |
| 51 kPolicyFetchNotModified, | |
| 52 | |
| 53 kPolicyStoreRequested, | |
| 54 kPolicyStoreFailed, | |
| 55 | |
| 56 kPolicyOperationsSize // Must be the last. | |
| 57 }; | |
| 58 | |
| 59 enum EnrollmentResult { | |
| 60 kEnrollmentShowScreen = 0, | |
| 61 kEnrollmentCancelled, | |
| 62 kEnrollmentStarted, | |
| 63 kEnrollmentNetworkFailed, | |
| 64 kEnrollmentLoginFailed, | |
| 65 kEnrollmentNotSupported, | |
| 66 kEnrollmentPolicyFailed, | |
| 67 kEnrollmentOtherFailed, | |
| 68 kEnrollmentOK, | |
| 69 | |
| 70 kEnrollmentOperationsSize // Must be the last. | |
| 71 }; | |
| 72 | |
| 73 void LogTokenOperation(TokenOperationResult result); | |
| 74 | |
| 75 void LogPolicyOperation(PolicyOperationResult result); | |
| 76 | |
| 77 void LogEnrollmentOperation(EnrollmentResult result); | |
| 78 | |
| 79 } // namespace enterprise_management | |
| 80 | |
| 81 #endif // CHROME_BROWSER_POLICY_ENTERPRISE_METRICS_H_ | |
| OLD | NEW |