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

Side by Side Diff: chrome/browser/chromeos/policy/device_cloud_policy_initializer.cc

Issue 2534433002: Mop up incorrect uses of IsEnterpriseManaged() (Closed)
Patch Set: Address Achuith' comments Created 4 years 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/chromeos/policy/device_cloud_policy_initializer.h" 5 #include "chrome/browser/chromeos/policy/device_cloud_policy_initializer.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/bind_helpers.h" 10 #include "base/bind_helpers.h"
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 break; 141 break;
142 } 142 }
143 143
144 // If OOBE is done and we are not enrolled, make sure we only try interactive 144 // If OOBE is done and we are not enrolled, make sure we only try interactive
145 // enrollment. 145 // enrollment.
146 const bool oobe_complete = local_state_->GetBoolean(prefs::kOobeComplete); 146 const bool oobe_complete = local_state_->GetBoolean(prefs::kOobeComplete);
147 if (oobe_complete && 147 if (oobe_complete &&
148 config.auth_mechanism == EnrollmentConfig::AUTH_MECHANISM_BEST_AVAILABLE) 148 config.auth_mechanism == EnrollmentConfig::AUTH_MECHANISM_BEST_AVAILABLE)
149 config.auth_mechanism = EnrollmentConfig::AUTH_MECHANISM_INTERACTIVE; 149 config.auth_mechanism = EnrollmentConfig::AUTH_MECHANISM_INTERACTIVE;
150 // If OOBE is done and we are enrolled, check for need to recover enrollment. 150 // If OOBE is done and we are enrolled, check for need to recover enrollment.
151 if (oobe_complete && install_attributes_->IsEnterpriseManaged()) { 151 // Enrollment recovery is not (yet?) supported for Active Directory.
Roman Sorokin (ftl) 2016/11/25 14:30:12 nit: Also change to "not implemented"
Thiemo Nagel 2016/11/25 15:06:29 Thanks. Done.
152 if (oobe_complete && install_attributes_->IsCloudManaged()) {
152 // Regardless what mode is applicable, the enrollment domain is fixed. 153 // Regardless what mode is applicable, the enrollment domain is fixed.
153 config.management_domain = install_attributes_->GetDomain(); 154 config.management_domain = install_attributes_->GetDomain();
154 155
155 // Enrollment has completed previously and installation-time attributes 156 // Enrollment has completed previously and installation-time attributes
156 // are in place. Enrollment recovery is required when the server 157 // are in place. Enrollment recovery is required when the server
157 // registration gets lost. 158 // registration gets lost.
158 if (local_state_->GetBoolean(prefs::kEnrollmentRecoveryRequired)) { 159 if (local_state_->GetBoolean(prefs::kEnrollmentRecoveryRequired)) {
159 LOG(WARNING) << "Enrollment recovery required according to pref."; 160 LOG(WARNING) << "Enrollment recovery required according to pref.";
160 if (statistics_provider_->GetEnterpriseMachineID().empty()) 161 if (statistics_provider_->GetEnterpriseMachineID().empty())
161 LOG(WARNING) << "Postponing recovery because machine id is missing."; 162 LOG(WARNING) << "Postponing recovery because machine id is missing.";
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
324 if (success && (success = att_signed_data.ParseFromString(signed_data))) { 325 if (success && (success = att_signed_data.ParseFromString(signed_data))) {
325 em_signed_data.set_data(att_signed_data.data()); 326 em_signed_data.set_data(att_signed_data.data());
326 em_signed_data.set_signature(att_signed_data.signature()); 327 em_signed_data.set_signature(att_signed_data.signature());
327 em_signed_data.set_extra_data_bytes(att_signed_data.data().size() - 328 em_signed_data.set_extra_data_bytes(att_signed_data.data().size() -
328 data.size()); 329 data.size());
329 } 330 }
330 callback.Run(success, em_signed_data); 331 callback.Run(success, em_signed_data);
331 } 332 }
332 333
333 } // namespace policy 334 } // namespace policy
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698