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

Unified Diff: components/policy/core/common/cloud/user_cloud_policy_store.cc

Issue 382813002: Added more policy UMA metrics. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed code format issue. 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 side-by-side diff with in-line comments
Download patch
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()) {

Powered by Google App Engine
This is Rietveld 408576698