Index: components/policy/core/common/cloud/user_cloud_policy_store.cc |
diff --git a/components/policy/core/common/cloud/user_cloud_policy_store.cc b/components/policy/core/common/cloud/user_cloud_policy_store.cc |
index 3d298e6f0204e1c5fbb432089b1c696eb5ed7e9b..99118962b2582d48335defda8dbdaedb99ba0fe6 100644 |
--- a/components/policy/core/common/cloud/user_cloud_policy_store.cc |
+++ b/components/policy/core/common/cloud/user_cloud_policy_store.cc |
@@ -28,6 +28,7 @@ enum PolicyLoadStatus { |
// Could not load the previously stored policy due to either a parse or |
// file read error. |
LOAD_RESULT_LOAD_ERROR, |
+ LOAD_RESULT_SIZE, |
Thiemo Nagel
2014/07/18 12:12:26
Please add a comment that SIZE must be last and is
Andrew T Wilson (Slow)
2014/07/24 15:25:56
Done.
|
}; |
// Struct containing the result of a policy load - if |status| == |
@@ -221,6 +222,9 @@ void UserCloudPolicyStore::Load() { |
void UserCloudPolicyStore::PolicyLoaded(bool validate_in_background, |
PolicyLoadResult result) { |
+ UMA_HISTOGRAM_ENUMERATION("Enterprise.UserCloudPolicyStore.LoadStatus", |
+ result.status, |
+ LOAD_RESULT_SIZE); |
switch (result.status) { |
case LOAD_RESULT_LOAD_ERROR: |
status_ = STATUS_LOAD_ERROR; |
@@ -274,6 +278,10 @@ void UserCloudPolicyStore::InstallLoadedPolicyAfterValidation( |
bool doing_key_rotation, |
const std::string& signing_key, |
UserCloudPolicyValidator* validator) { |
+ UMA_HISTOGRAM_ENUMERATION( |
+ "Enterprise.UserCloudPolicyStore.LoadValidationStatus", |
+ validator->status(), |
+ CloudPolicyValidatorBase::VALIDATION_STATUS_SIZE); |
validation_status_ = validator->status(); |
if (!validator->success()) { |
DVLOG(1) << "Validation failed: status=" << validation_status_; |
@@ -416,6 +424,10 @@ void UserCloudPolicyStore::Validate( |
void UserCloudPolicyStore::StorePolicyAfterValidation( |
UserCloudPolicyValidator* validator) { |
+ UMA_HISTOGRAM_ENUMERATION( |
+ "Enterprise.UserCloudPolicyStore.StoreValidationStatus", |
+ validator->status(), |
+ CloudPolicyValidatorBase::VALIDATION_STATUS_SIZE); |
validation_status_ = validator->status(); |
DVLOG(1) << "Policy validation complete: status = " << validation_status_; |
if (!validator->success()) { |