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(); |
} |