| OLD | NEW |
| 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/login/enrollment/auto_enrollment_check_screen.
h" | 5 #include "chrome/browser/chromeos/login/enrollment/auto_enrollment_check_screen.
h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/bind_helpers.h" | 8 #include "base/bind_helpers.h" |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/location.h" | 10 #include "base/location.h" |
| (...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 198 | 198 |
| 199 // Return is required to avoid compiler warning. | 199 // Return is required to avoid compiler warning. |
| 200 NOTREACHED() << "Bad status " << new_captive_portal_status; | 200 NOTREACHED() << "Bad status " << new_captive_portal_status; |
| 201 return false; | 201 return false; |
| 202 } | 202 } |
| 203 | 203 |
| 204 bool AutoEnrollmentCheckScreen::UpdateAutoEnrollmentState( | 204 bool AutoEnrollmentCheckScreen::UpdateAutoEnrollmentState( |
| 205 policy::AutoEnrollmentState new_auto_enrollment_state) { | 205 policy::AutoEnrollmentState new_auto_enrollment_state) { |
| 206 switch (new_auto_enrollment_state) { | 206 switch (new_auto_enrollment_state) { |
| 207 case policy::AUTO_ENROLLMENT_STATE_IDLE: | 207 case policy::AUTO_ENROLLMENT_STATE_IDLE: |
| 208 // The client should have been started already. | |
| 209 NOTREACHED(); | |
| 210 return false; | |
| 211 case policy::AUTO_ENROLLMENT_STATE_PENDING: | 208 case policy::AUTO_ENROLLMENT_STATE_PENDING: |
| 212 case policy::AUTO_ENROLLMENT_STATE_SERVER_ERROR: | 209 case policy::AUTO_ENROLLMENT_STATE_SERVER_ERROR: |
| 213 case policy::AUTO_ENROLLMENT_STATE_TRIGGER_ENROLLMENT: | 210 case policy::AUTO_ENROLLMENT_STATE_TRIGGER_ENROLLMENT: |
| 214 case policy::AUTO_ENROLLMENT_STATE_NO_ENROLLMENT: | 211 case policy::AUTO_ENROLLMENT_STATE_NO_ENROLLMENT: |
| 215 return false; | 212 return false; |
| 216 case policy::AUTO_ENROLLMENT_STATE_CONNECTION_ERROR: | 213 case policy::AUTO_ENROLLMENT_STATE_CONNECTION_ERROR: |
| 217 ShowErrorScreen(NetworkError::ERROR_STATE_OFFLINE); | 214 ShowErrorScreen(NetworkError::ERROR_STATE_OFFLINE); |
| 218 return true; | 215 return true; |
| 219 } | 216 } |
| 220 | 217 |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 268 } | 265 } |
| 269 NOTREACHED(); | 266 NOTREACHED(); |
| 270 return false; | 267 return false; |
| 271 } | 268 } |
| 272 | 269 |
| 273 void AutoEnrollmentCheckScreen::OnConnectRequested() { | 270 void AutoEnrollmentCheckScreen::OnConnectRequested() { |
| 274 auto_enrollment_controller_->Retry(); | 271 auto_enrollment_controller_->Retry(); |
| 275 } | 272 } |
| 276 | 273 |
| 277 } // namespace chromeos | 274 } // namespace chromeos |
| OLD | NEW |