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

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

Issue 2625123003: Don't fetch robot account for the Active Directory managed devices. (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 3cd92cad13c821241e497cd386c316e1cfcbd116..7aceb11371bfdf24dfa563914ec09a2257924a2d 100644
--- a/chrome/browser/chromeos/policy/enrollment_handler_chromeos.cc
+++ b/chrome/browser/chromeos/policy/enrollment_handler_chromeos.cc
@@ -324,14 +324,18 @@ void EnrollmentHandlerChromeOS::HandlePolicyValidationResult(
DCHECK_EQ(STEP_VALIDATION, enrollment_step_);
if (validator->success()) {
std::string username = validator->policy_data()->username();
- // TODO(rsorokin): remove device_mode_ check when device is locked
- // with both realm and domain.
- if (device_mode_ != DEVICE_MODE_ENTERPRISE_AD)
- domain_ = gaia::ExtractDomainName(gaia::CanonicalizeEmail(username));
device_id_ = validator->policy_data()->device_id();
policy_ = std::move(validator->policy());
- SetStep(STEP_ROBOT_AUTH_FETCH);
- client_->FetchRobotAuthCodes(auth_token_);
+ if (device_mode_ == DEVICE_MODE_ENTERPRISE_AD) {
+ // Don't use robot account for the Active Directory managed devices.
+ skip_robot_auth_ = true;
+ SetStep(STEP_LOCK_DEVICE);
+ StartLockDevice();
+ } else {
+ domain_ = gaia::ExtractDomainName(gaia::CanonicalizeEmail(username));
+ SetStep(STEP_ROBOT_AUTH_FETCH);
+ client_->FetchRobotAuthCodes(auth_token_);
+ }
} else {
ReportResult(EnrollmentStatus::ForValidationError(validator->status()));
}
« 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