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

Unified Diff: chrome/browser/chromeos/login/enrollment/enterprise_enrollment_helper_impl.cc

Issue 2677563005: Chromad: Use DM server reply to determine enrollment type (Closed)
Patch Set: comments+create ActiveDirectoryJoinDelegate Created 3 years, 10 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
Index: chrome/browser/chromeos/login/enrollment/enterprise_enrollment_helper_impl.cc
diff --git a/chrome/browser/chromeos/login/enrollment/enterprise_enrollment_helper_impl.cc b/chrome/browser/chromeos/login/enrollment/enterprise_enrollment_helper_impl.cc
index a7495932aec90e8618c9f6dc81cd075517f223c7..7dd76f026b5ce67ef38b08e7351f3210962bde11 100644
--- a/chrome/browser/chromeos/login/enrollment/enterprise_enrollment_helper_impl.cc
+++ b/chrome/browser/chromeos/login/enrollment/enterprise_enrollment_helper_impl.cc
@@ -67,11 +67,13 @@ namespace chromeos {
EnterpriseEnrollmentHelperImpl::EnterpriseEnrollmentHelperImpl(
EnrollmentStatusConsumer* status_consumer,
+ ActiveDirectoryJoinDelegate* join_delegate,
const policy::EnrollmentConfig& enrollment_config,
const std::string& enrolling_user_domain)
: EnterpriseEnrollmentHelper(status_consumer),
enrollment_config_(enrollment_config),
enrolling_user_domain_(enrolling_user_domain),
+ join_delegate_(join_delegate),
weak_ptr_factory_(this) {
// Init the TPM if it has not been done until now (in debug build we might
// have not done that yet).
@@ -163,22 +165,22 @@ void EnterpriseEnrollmentHelperImpl::DoEnroll(const std::string& token) {
connector->GetDeviceCloudPolicyInitializer();
CHECK(dcp_initializer);
dcp_initializer->StartEnrollment(
- connector->device_management_service(), enrollment_config_, token,
+ connector->device_management_service(), join_delegate_,
+ enrollment_config_, token,
base::Bind(&EnterpriseEnrollmentHelperImpl::OnEnrollmentFinished,
weak_ptr_factory_.GetWeakPtr()));
}
void EnterpriseEnrollmentHelperImpl::GetDeviceAttributeUpdatePermission() {
- // Don't update device attributes for Active Directory management.
- if (!enrollment_config_.management_realm.empty()) {
- OnDeviceAttributeUpdatePermission(false);
- return;
- }
-
// TODO(pbond): remove this LOG once http://crbug.com/586961 is fixed.
LOG(WARNING) << "Get device attribute update permission";
policy::BrowserPolicyConnectorChromeOS* connector =
g_browser_process->platform_part()->browser_policy_connector_chromeos();
+ // Don't update device attributes for Active Directory management.
+ if (connector->IsActiveDirectoryManaged()) {
+ OnDeviceAttributeUpdatePermission(false);
+ return;
+ }
policy::DeviceCloudPolicyManagerChromeOS* policy_manager =
connector->GetDeviceCloudPolicyManager();
policy::CloudPolicyClient* client = policy_manager->core()->client();

Powered by Google App Engine
This is Rietveld 408576698