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

Unified Diff: chrome/browser/chromeos/policy/enrollment_handler_chromeos.cc

Issue 2654143003: Clear Active Directory realm in case of cloud management (Closed)
Patch Set: Created 3 years, 11 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/policy/enrollment_handler_chromeos.cc
diff --git a/chrome/browser/chromeos/policy/enrollment_handler_chromeos.cc b/chrome/browser/chromeos/policy/enrollment_handler_chromeos.cc
index 6be059dd20f1714edd0bffc8777844baef69608d..1596d0af84ed6709f839f94aac13d113b4330849 100644
--- a/chrome/browser/chromeos/policy/enrollment_handler_chromeos.cc
+++ b/chrome/browser/chromeos/policy/enrollment_handler_chromeos.cc
@@ -202,8 +202,10 @@ void EnrollmentHandlerChromeOS::OnRegistrationStateChanged(
if (enrollment_step_ == STEP_REGISTRATION && client_->is_registered()) {
SetStep(STEP_POLICY_FETCH);
device_mode_ = client_->device_mode();
- if (device_mode_ != DEVICE_MODE_ENTERPRISE &&
- device_mode_ != DEVICE_MODE_ENTERPRISE_AD) {
+ if (!((device_mode_ == DEVICE_MODE_ENTERPRISE &&
+ enrollment_config_.management_realm.empty()) ||
+ (device_mode_ == DEVICE_MODE_ENTERPRISE_AD &&
+ !enrollment_config_.management_realm.empty()))) {
LOG(ERROR) << "Bad device mode " << device_mode_;
ReportResult(
EnrollmentStatus::ForStatus(EnrollmentStatus::REGISTRATION_BAD_MODE));
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698