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

Unified Diff: components/policy/core/common/policy_loader_win.cc

Issue 375903002: Fix EnterpriseDeviceManagementStatus UMA enum, add comments. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Cosmetics. 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
« no previous file with comments | « components/policy/core/common/policy_load_status.h ('k') | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/policy/core/common/policy_loader_win.cc
diff --git a/components/policy/core/common/policy_loader_win.cc b/components/policy/core/common/policy_loader_win.cc
index c956a74a92913ba65e0614170388debc8c342b16..9f697b6bfb0a1def1f2d054eac1800275ba07918 100644
--- a/components/policy/core/common/policy_loader_win.cc
+++ b/components/policy/core/common/policy_loader_win.cc
@@ -77,10 +77,14 @@ GUID kRegistrySettingsCSEGUID = REGISTRY_EXTENSION_GUID;
// The list of possible errors that can occur while collecting information about
// the current enterprise environment.
+// This enum is used to define the buckets for an enumerated UMA histogram.
+// Hence,
+// (a) existing enumerated constants should never be deleted or reordered, and
+// (b) new constants should only be appended at the end of the enumeration.
enum DomainCheckErrors {
DOMAIN_CHECK_ERROR_GET_JOIN_INFO = 0,
- DOMAIN_CHECK_ERROR_DS_BIND,
- DOMAIN_CHECK_ERROR_LAST,
+ DOMAIN_CHECK_ERROR_DS_BIND = 1,
+ DOMAIN_CHECK_ERROR_SIZE, // Not a DomainCheckError. Must be last.
};
// If the LBS extension is found and contains a schema in the registry then this
@@ -304,7 +308,7 @@ void CollectEnterpriseUMAs() {
if (NERR_Success != ::NetGetJoinInformation(NULL, &domain, &join_status)) {
UMA_HISTOGRAM_ENUMERATION("EnterpriseCheck.DomainCheckFailed",
DOMAIN_CHECK_ERROR_GET_JOIN_INFO,
- DOMAIN_CHECK_ERROR_LAST);
+ DOMAIN_CHECK_ERROR_SIZE);
return;
}
::NetApiBufferFree(domain);
@@ -321,7 +325,7 @@ void CollectEnterpriseUMAs() {
} else {
UMA_HISTOGRAM_ENUMERATION("EnterpriseCheck.DomainCheckFailed",
DOMAIN_CHECK_ERROR_DS_BIND,
- DOMAIN_CHECK_ERROR_LAST);
+ DOMAIN_CHECK_ERROR_SIZE);
}
}
}
« no previous file with comments | « components/policy/core/common/policy_load_status.h ('k') | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698