| 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/supervised/supervised_user_creation_scre
en.h" | 5 #include "chrome/browser/chromeos/login/supervised/supervised_user_creation_scre
en.h" |
| 6 | 6 |
| 7 #include "ash/desktop_background/desktop_background_controller.h" | 7 #include "ash/desktop_background/desktop_background_controller.h" |
| 8 #include "ash/shell.h" | 8 #include "ash/shell.h" |
| 9 #include "base/rand_util.h" | 9 #include "base/rand_util.h" |
| 10 #include "base/values.h" | 10 #include "base/values.h" |
| (...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 149 void SupervisedUserCreationScreen::OnPageSelected(const std::string& page) { | 149 void SupervisedUserCreationScreen::OnPageSelected(const std::string& page) { |
| 150 last_page_ = page; | 150 last_page_ = page; |
| 151 } | 151 } |
| 152 | 152 |
| 153 void SupervisedUserCreationScreen::OnPortalDetectionCompleted( | 153 void SupervisedUserCreationScreen::OnPortalDetectionCompleted( |
| 154 const NetworkState* network, | 154 const NetworkState* network, |
| 155 const NetworkPortalDetector::CaptivePortalState& state) { | 155 const NetworkPortalDetector::CaptivePortalState& state) { |
| 156 if (state.status == NetworkPortalDetector::CAPTIVE_PORTAL_STATUS_ONLINE) { | 156 if (state.status == NetworkPortalDetector::CAPTIVE_PORTAL_STATUS_ONLINE) { |
| 157 get_base_screen_delegate()->HideErrorScreen(this); | 157 get_base_screen_delegate()->HideErrorScreen(this); |
| 158 histogram_helper_->OnErrorHide(); | 158 histogram_helper_->OnErrorHide(); |
| 159 } else { | 159 } else if (state.status != |
| 160 NetworkPortalDetector::CAPTIVE_PORTAL_STATUS_UNKNOWN) { |
| 160 on_error_screen_ = true; | 161 on_error_screen_ = true; |
| 161 ErrorScreen* screen = get_base_screen_delegate()->GetErrorScreen(); | 162 ErrorScreen* screen = get_base_screen_delegate()->GetErrorScreen(); |
| 162 ConfigureErrorScreen(screen, network, state.status); | 163 ConfigureErrorScreen(screen, network, state.status); |
| 163 screen->SetUIState(NetworkError::UI_STATE_SUPERVISED); | 164 screen->SetUIState(NetworkError::UI_STATE_SUPERVISED); |
| 164 get_base_screen_delegate()->ShowErrorScreen(); | 165 get_base_screen_delegate()->ShowErrorScreen(); |
| 165 histogram_helper_->OnErrorShow(screen->GetErrorState()); | 166 histogram_helper_->OnErrorShow(screen->GetErrorState()); |
| 166 } | 167 } |
| 167 } | 168 } |
| 168 | 169 |
| 169 void SupervisedUserCreationScreen::ShowManagerInconsistentStateErrorScreen() { | 170 void SupervisedUserCreationScreen::ShowManagerInconsistentStateErrorScreen() { |
| (...skipping 451 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 621 selected_image_ = user_manager::User::USER_IMAGE_EXTERNAL; | 622 selected_image_ = user_manager::User::USER_IMAGE_EXTERNAL; |
| 622 } else { | 623 } else { |
| 623 NOTREACHED() << "Unexpected image type: " << image_type; | 624 NOTREACHED() << "Unexpected image type: " << image_type; |
| 624 } | 625 } |
| 625 } | 626 } |
| 626 | 627 |
| 627 void SupervisedUserCreationScreen::OnImageAccepted() { | 628 void SupervisedUserCreationScreen::OnImageAccepted() { |
| 628 } | 629 } |
| 629 | 630 |
| 630 } // namespace chromeos | 631 } // namespace chromeos |
| OLD | NEW |