summaryrefslogtreecommitdiffstats
path: root/components
diff options
context:
space:
mode:
authormnissler@chromium.org <mnissler@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-03-28 11:13:52 +0000
committermnissler@chromium.org <mnissler@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-03-28 11:13:52 +0000
commit55b3a2460f0477558a8d293a087f7654475a0401 (patch)
tree2994d6c9abafbb2331906bc47fe7b7e57c39e261 /components
parent463b15c7d025779615514adf3f1540d30a6366d1 (diff)
downloadchromium_src-55b3a2460f0477558a8d293a087f7654475a0401.zip
chromium_src-55b3a2460f0477558a8d293a087f7654475a0401.tar.gz
chromium_src-55b3a2460f0477558a8d293a087f7654475a0401.tar.bz2
Add error message for domain mismatch on re-enrollment.
This error shows up if the server indicates to the client that enrollment got rejected due to the device belonging do a different domain (as indicated by the client-provided state key). BUG=chromium:357207 TEST=Manual, check that the error message shows up on domain mismatch. R=asvitkine@chromium.org, dpolukhin@chromium.org, joaodasilva@chromium.org Review URL: https://codereview.chromium.org/214963002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@260102 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'components')
-rw-r--r--components/policy/core/browser/cloud/message_util.cc2
-rw-r--r--components/policy/core/common/cloud/cloud_policy_constants.h2
-rw-r--r--components/policy/core/common/cloud/cloud_policy_refresh_scheduler.cc1
-rw-r--r--components/policy/core/common/cloud/device_management_service.cc4
-rw-r--r--components/policy/core/common/cloud/enterprise_metrics.h2
-rw-r--r--components/policy_strings.grdp3
6 files changed, 14 insertions, 0 deletions
diff --git a/components/policy/core/browser/cloud/message_util.cc b/components/policy/core/browser/cloud/message_util.cc
index f394762..ea9f65e 100644
--- a/components/policy/core/browser/cloud/message_util.cc
+++ b/components/policy/core/browser/cloud/message_util.cc
@@ -42,6 +42,8 @@ int GetIDSForDMStatus(DeviceManagementStatus status) {
return IDS_POLICY_DM_STATUS_SERVICE_MISSING_LICENSES;
case DM_STATUS_SERVICE_DEPROVISIONED:
return IDS_POLICY_DM_STATUS_SERVICE_DEPROVISIONED;
+ case DM_STATUS_SERVICE_DOMAIN_MISMATCH:
+ return IDS_POLICY_DM_STATUS_SERVICE_DOMAIN_MISMATCH;
case DM_STATUS_SERVICE_POLICY_NOT_FOUND:
return IDS_POLICY_DM_STATUS_SERVICE_POLICY_NOT_FOUND;
}
diff --git a/components/policy/core/common/cloud/cloud_policy_constants.h b/components/policy/core/common/cloud/cloud_policy_constants.h
index 4f67f45..350cb42 100644
--- a/components/policy/core/common/cloud/cloud_policy_constants.h
+++ b/components/policy/core/common/cloud/cloud_policy_constants.h
@@ -95,6 +95,8 @@ enum DeviceManagementStatus {
DM_STATUS_SERVICE_MISSING_LICENSES,
// Service error: The administrator has deprovisioned this client.
DM_STATUS_SERVICE_DEPROVISIONED,
+ // Service error: Device registration for the wrong domain.
+ DM_STATUS_SERVICE_DOMAIN_MISMATCH,
// Service error: Policy not found. Error code defined by the DM folks.
DM_STATUS_SERVICE_POLICY_NOT_FOUND = 902,
};
diff --git a/components/policy/core/common/cloud/cloud_policy_refresh_scheduler.cc b/components/policy/core/common/cloud/cloud_policy_refresh_scheduler.cc
index ad221d1..9bc4a32 100644
--- a/components/policy/core/common/cloud/cloud_policy_refresh_scheduler.cc
+++ b/components/policy/core/common/cloud/cloud_policy_refresh_scheduler.cc
@@ -304,6 +304,7 @@ void CloudPolicyRefreshScheduler::ScheduleRefresh() {
case DM_STATUS_SERVICE_DEVICE_ID_CONFLICT:
case DM_STATUS_SERVICE_MISSING_LICENSES:
case DM_STATUS_SERVICE_DEPROVISIONED:
+ case DM_STATUS_SERVICE_DOMAIN_MISMATCH:
// Need a re-registration, no use in retrying.
refresh_callback_.Cancel();
return;
diff --git a/components/policy/core/common/cloud/device_management_service.cc b/components/policy/core/common/cloud/device_management_service.cc
index 95b9c3c..5d01ff8 100644
--- a/components/policy/core/common/cloud/device_management_service.cc
+++ b/components/policy/core/common/cloud/device_management_service.cc
@@ -41,6 +41,7 @@ const int kMissingLicenses = 402;
const int kDeviceManagementNotAllowed = 403;
const int kInvalidURL = 404; // This error is not coming from the GFE.
const int kInvalidSerialNumber = 405;
+const int kDomainMismatch = 406;
const int kDeviceIdConflict = 409;
const int kDeviceNotFound = 410;
const int kPendingApproval = 412;
@@ -259,6 +260,9 @@ void DeviceManagementRequestJobImpl::HandleResponse(
case kInvalidSerialNumber:
ReportError(DM_STATUS_SERVICE_INVALID_SERIAL_NUMBER);
return;
+ case kDomainMismatch:
+ ReportError(DM_STATUS_SERVICE_DOMAIN_MISMATCH);
+ return;
case kDeprovisioned:
ReportError(DM_STATUS_SERVICE_DEPROVISIONED);
return;
diff --git a/components/policy/core/common/cloud/enterprise_metrics.h b/components/policy/core/common/cloud/enterprise_metrics.h
index 7d5108e..f3af080 100644
--- a/components/policy/core/common/cloud/enterprise_metrics.h
+++ b/components/policy/core/common/cloud/enterprise_metrics.h
@@ -165,6 +165,8 @@ enum MetricEnrollment {
kMetricEnrollmentRobotRefreshTokenStoreFailed,
// Enrollment failed because the administrator has deprovisioned the device.
kMetricEnrollmentDeprovisioned,
+ // Enrollment failed because the device doesn't belong to the domain.
+ kMetricEnrollmentDomainMismatch,
kMetricEnrollmentSize // Must be the last.
};
diff --git a/components/policy_strings.grdp b/components/policy_strings.grdp
index c7a667c..443bd5b 100644
--- a/components/policy_strings.grdp
+++ b/components/policy_strings.grdp
@@ -43,6 +43,9 @@
<message name="IDS_POLICY_DM_STATUS_SERVICE_DEPROVISIONED" desc="Message indicating the administrator has deprovisioned this client on the server.">
Deprovisioned
</message>
+ <message name="IDS_POLICY_DM_STATUS_SERVICE_DOMAIN_MISMATCH" desc="Message indicating this client cannot be registered with the specified domain.">
+ Domain mismatch
+ </message>
<message name="IDS_POLICY_DM_STATUS_SERVICE_POLICY_NOT_FOUND" desc="Message indicating that the enterprise server failed to find the policy to be applied to the device.">
Policy not found
</message>