Chromium Code Reviews| Index: chrome/browser/policy/enterprise_metrics.h |
| diff --git a/chrome/browser/policy/enterprise_metrics.h b/chrome/browser/policy/enterprise_metrics.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..78b52d23652406f680ce58b97ab752488c5f48ef |
| --- /dev/null |
| +++ b/chrome/browser/policy/enterprise_metrics.h |
| @@ -0,0 +1,81 @@ |
| +// Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef CHROME_BROWSER_POLICY_ENTERPRISE_METRICS_H_ |
| +#define CHROME_BROWSER_POLICY_ENTERPRISE_METRICS_H_ |
| +#pragma once |
| + |
| +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.
|
| + |
| +// Defines the metrics collected for enterprise events, and provides |
| +// functions to collect them. |
| + |
| +enum TokenOperationResult { |
| + kTokenLoadRequested = 0, |
| + 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
|
| + |
| + kTokenFetchRequested, |
| + kTokenFetchRequestFailed, |
| + kTokenFetchServerFailed, |
| + kTokenFetchResponseReceived, |
| + kTokenFetchBadResponse, |
| + kTokenFetchManagementNotSupported, |
| + kTokenFetchDeviceNotFound, |
| + kTokenFetchOK, |
| + |
| + kTokenStoreRequested, |
| + kTokenStoreFailed, |
| + |
| + kTokenOperationsSize // Must be the last. |
| +}; |
| + |
| +enum PolicyOperationResult { |
| + kPolicyLoadRequested = 0, |
| + kPolicyLoadFailed, |
| + |
| + kPolicyFetchRequested, |
| + kPolicyFetchRequestFailed, |
| + kPolicyFetchServerFailed, |
| + kPolicyFetchNotFound, |
| + kPolicyFetchResponseReceived, |
| + kPolicyFetchBadResponse, |
| + kPolicyFetchInvalidToken, |
| + kPolicyFetchInvalidPolicy, |
| + kPolicyFetchBadSignature, |
| + kPolicyFetchTimestampInFuture, |
| + kPolicyFetchNonEnterpriseDevice, |
| + kPolicyFetchUserMismatch, |
| + kPolicyFetchOtherFailed, |
| + kPolicyFetchOK, |
| + kPolicyFetchNotModified, |
| + |
| + kPolicyStoreRequested, |
| + kPolicyStoreFailed, |
| + |
| + kPolicyOperationsSize // Must be the last. |
| +}; |
| + |
| +enum EnrollmentResult { |
| + kEnrollmentShowScreen = 0, |
| + kEnrollmentCancelled, |
| + kEnrollmentStarted, |
| + kEnrollmentNetworkFailed, |
| + kEnrollmentLoginFailed, |
| + kEnrollmentNotSupported, |
| + kEnrollmentPolicyFailed, |
| + kEnrollmentOtherFailed, |
| + kEnrollmentOK, |
| + |
| + kEnrollmentOperationsSize // Must be the last. |
| +}; |
| + |
| +void LogTokenOperation(TokenOperationResult result); |
| + |
| +void LogPolicyOperation(PolicyOperationResult result); |
| + |
| +void LogEnrollmentOperation(EnrollmentResult result); |
| + |
| +} // namespace enterprise_management |
| + |
| +#endif // CHROME_BROWSER_POLICY_ENTERPRISE_METRICS_H_ |