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

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

Issue 2329303002: Delete obsolete AllowedDeviceModes enrollment parameter. (Closed)
Patch Set: Fix tests. Created 4 years, 3 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/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 ea874a006dca88b7f5d987c21fd934066b6fc704..574177b306114d7fc978a5ac82b71cf0261ba9ea 100644
--- a/chrome/browser/chromeos/policy/enrollment_handler_chromeos.cc
+++ b/chrome/browser/chromeos/policy/enrollment_handler_chromeos.cc
@@ -79,7 +79,6 @@ EnrollmentHandlerChromeOS::EnrollmentHandlerChromeOS(
const std::string& auth_token,
const std::string& client_id,
const std::string& requisition,
- const AllowedDeviceModes& allowed_device_modes,
const EnrollmentCallback& completion_callback)
: store_(store),
install_attributes_(install_attributes),
@@ -91,7 +90,6 @@ EnrollmentHandlerChromeOS::EnrollmentHandlerChromeOS(
auth_token_(auth_token),
client_id_(client_id),
requisition_(requisition),
- allowed_device_modes_(allowed_device_modes),
completion_callback_(completion_callback),
device_mode_(DEVICE_MODE_NOT_SET),
skip_robot_auth_(false),
@@ -184,9 +182,7 @@ void EnrollmentHandlerChromeOS::OnRegistrationStateChanged(
if (enrollment_step_ == STEP_REGISTRATION && client_->is_registered()) {
enrollment_step_ = STEP_POLICY_FETCH,
device_mode_ = client_->device_mode();
- if (device_mode_ == DEVICE_MODE_NOT_SET)
- device_mode_ = DEVICE_MODE_ENTERPRISE;
- if (!allowed_device_modes_.test(device_mode_)) {
+ if (device_mode_ != policy::DEVICE_MODE_ENTERPRISE) {
LOG(ERROR) << "Bad device mode " << device_mode_;
ReportResult(EnrollmentStatus::ForStatus(
EnrollmentStatus::STATUS_REGISTRATION_BAD_MODE));

Powered by Google App Engine
This is Rietveld 408576698