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

Unified Diff: chrome/browser/policy/cloud/user_cloud_policy_invalidator.cc

Issue 465433002: Separate UMA histograms for user and device policy invalidation (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Nesting preprocessor directives inside macros does not work under Windows. Created 6 years, 4 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: chrome/browser/policy/cloud/user_cloud_policy_invalidator.cc
diff --git a/chrome/browser/policy/cloud/user_cloud_policy_invalidator.cc b/chrome/browser/policy/cloud/user_cloud_policy_invalidator.cc
index 504abafcfa455c38a42612645eea6fbcab96021f..7770616cf9f5de115dd53bb8753be78bd8af5996 100644
--- a/chrome/browser/policy/cloud/user_cloud_policy_invalidator.cc
+++ b/chrome/browser/policy/cloud/user_cloud_policy_invalidator.cc
@@ -19,10 +19,10 @@ namespace policy {
UserCloudPolicyInvalidator::UserCloudPolicyInvalidator(
Profile* profile,
CloudPolicyManager* policy_manager)
- : CloudPolicyInvalidator(
- policy_manager->core(),
- base::MessageLoopProxy::current(),
- scoped_ptr<base::Clock>(new base::DefaultClock())),
+ : CloudPolicyInvalidator(GetPolicyType(),
+ policy_manager->core(),
+ base::MessageLoopProxy::current(),
+ scoped_ptr<base::Clock>(new base::DefaultClock())),
profile_(profile) {
DCHECK(profile);
@@ -38,6 +38,20 @@ UserCloudPolicyInvalidator::UserCloudPolicyInvalidator(
content::Source<Profile>(profile));
}
+// static
+enterprise_management::DeviceRegisterRequest::Type
+UserCloudPolicyInvalidator::GetPolicyType() {
+#if defined(OS_CHROMEOS)
+ return enterprise_management::DeviceRegisterRequest::USER;
+#elif defined(OS_ANDROID)
+ return enterprise_management::DeviceRegisterRequest::ANDROID_BROWSER;
+#elif defined(OS_IOS)
+ return enterprise_management::DeviceRegisterRequest::IOS_BROWSER;
+#else
+ return enterprise_management::DeviceRegisterRequest::BROWSER;
+#endif
+}
+
void UserCloudPolicyInvalidator::Shutdown() {
CloudPolicyInvalidator::Shutdown();
}
« no previous file with comments | « chrome/browser/policy/cloud/user_cloud_policy_invalidator.h ('k') | components/policy/core/common/cloud/enterprise_metrics.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698