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

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

Issue 2642793002: Don't start device cloud policy connection after Chromad enrollment (Closed)
Patch Set: Check for enrollment type in EnrollmentCompleted() and TryToCreateClient() 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/device_cloud_policy_initializer.cc
diff --git a/chrome/browser/chromeos/policy/device_cloud_policy_initializer.cc b/chrome/browser/chromeos/policy/device_cloud_policy_initializer.cc
index 0d9495cae772967d26d78e151c86dc28cfd86059..4716d6b77ad879640693c3850d77a7c77e9b2f33 100644
--- a/chrome/browser/chromeos/policy/device_cloud_policy_initializer.cc
+++ b/chrome/browser/chromeos/policy/device_cloud_policy_initializer.cc
@@ -244,7 +244,8 @@ void DeviceCloudPolicyInitializer::EnrollmentCompleted(
enrollment_handler_->ReleaseClient();
enrollment_handler_.reset();
- if (status.status() == EnrollmentStatus::SUCCESS) {
+ if (status.status() == EnrollmentStatus::SUCCESS &&
+ !install_attributes_->IsActiveDirectoryManaged()) {
StartConnection(std::move(client));
} else {
// Some attempts to create a client may be blocked because the enrollment
@@ -271,7 +272,8 @@ void DeviceCloudPolicyInitializer::TryToCreateClient() {
if (!device_store_->is_initialized() ||
!device_store_->has_policy() ||
state_keys_broker_->pending() ||
- enrollment_handler_) {
+ enrollment_handler_ ||
+ install_attributes_->IsActiveDirectoryManaged()) {
return;
}
StartConnection(CreateClient(enterprise_service_));
« 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