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

Side by Side Diff: chrome/browser/ui/webui/chromeos/login/enrollment_screen_handler.cc

Issue 2314913003: Deprecate HOSTED_NOT_ALLOWED auth error (Closed)
Patch Set: Replace NUM_DEPRECATED_STATES with IsDeprecated() 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/ui/webui/chromeos/login/enrollment_screen_handler.h" 5 #include "chrome/browser/ui/webui/chromeos/login/enrollment_screen_handler.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
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 179 matching lines...) Expand 10 before | Expand all | Expand 10 after
190 const std::string& enterprise_domain) { 190 const std::string& enterprise_domain) {
191 CallJS("showAttestationBasedEnrollmentSuccess", enterprise_domain); 191 CallJS("showAttestationBasedEnrollmentSuccess", enterprise_domain);
192 } 192 }
193 193
194 void EnrollmentScreenHandler::ShowAuthError( 194 void EnrollmentScreenHandler::ShowAuthError(
195 const GoogleServiceAuthError& error) { 195 const GoogleServiceAuthError& error) {
196 switch (error.state()) { 196 switch (error.state()) {
197 case GoogleServiceAuthError::NONE: 197 case GoogleServiceAuthError::NONE:
198 case GoogleServiceAuthError::CAPTCHA_REQUIRED: 198 case GoogleServiceAuthError::CAPTCHA_REQUIRED:
199 case GoogleServiceAuthError::TWO_FACTOR: 199 case GoogleServiceAuthError::TWO_FACTOR:
200 case GoogleServiceAuthError::HOSTED_NOT_ALLOWED:
201 case GoogleServiceAuthError::INVALID_GAIA_CREDENTIALS: 200 case GoogleServiceAuthError::INVALID_GAIA_CREDENTIALS:
202 case GoogleServiceAuthError::REQUEST_CANCELED: 201 case GoogleServiceAuthError::REQUEST_CANCELED:
203 case GoogleServiceAuthError::UNEXPECTED_SERVICE_RESPONSE: 202 case GoogleServiceAuthError::UNEXPECTED_SERVICE_RESPONSE:
204 case GoogleServiceAuthError::SERVICE_ERROR: 203 case GoogleServiceAuthError::SERVICE_ERROR:
205 case GoogleServiceAuthError::WEB_LOGIN_REQUIRED: 204 case GoogleServiceAuthError::WEB_LOGIN_REQUIRED:
206 ShowError(IDS_ENTERPRISE_ENROLLMENT_AUTH_FATAL_ERROR, false); 205 ShowError(IDS_ENTERPRISE_ENROLLMENT_AUTH_FATAL_ERROR, false);
207 return; 206 return;
208 case GoogleServiceAuthError::USER_NOT_SIGNED_UP: 207 case GoogleServiceAuthError::USER_NOT_SIGNED_UP:
209 case GoogleServiceAuthError::ACCOUNT_DELETED: 208 case GoogleServiceAuthError::ACCOUNT_DELETED:
210 case GoogleServiceAuthError::ACCOUNT_DISABLED: 209 case GoogleServiceAuthError::ACCOUNT_DISABLED:
211 ShowError(IDS_ENTERPRISE_ENROLLMENT_AUTH_ACCOUNT_ERROR, true); 210 ShowError(IDS_ENTERPRISE_ENROLLMENT_AUTH_ACCOUNT_ERROR, true);
212 return; 211 return;
213 case GoogleServiceAuthError::CONNECTION_FAILED: 212 case GoogleServiceAuthError::CONNECTION_FAILED:
214 case GoogleServiceAuthError::SERVICE_UNAVAILABLE: 213 case GoogleServiceAuthError::SERVICE_UNAVAILABLE:
215 ShowError(IDS_ENTERPRISE_ENROLLMENT_AUTH_NETWORK_ERROR, true); 214 ShowError(IDS_ENTERPRISE_ENROLLMENT_AUTH_NETWORK_ERROR, true);
216 return; 215 return;
216 case GoogleServiceAuthError::HOSTED_NOT_ALLOWED_DEPRECATED:
217 case GoogleServiceAuthError::NUM_STATES: 217 case GoogleServiceAuthError::NUM_STATES:
218 break; 218 break;
219 } 219 }
220 NOTREACHED(); 220 NOTREACHED();
221 } 221 }
222 222
223 void EnrollmentScreenHandler::ShowOtherError( 223 void EnrollmentScreenHandler::ShowOtherError(
224 EnterpriseEnrollmentHelper::OtherError error) { 224 EnterpriseEnrollmentHelper::OtherError error) {
225 switch (error) { 225 switch (error) {
226 case EnterpriseEnrollmentHelper::OTHER_ERROR_DOMAIN_MISMATCH: 226 case EnterpriseEnrollmentHelper::OTHER_ERROR_DOMAIN_MISMATCH:
(...skipping 332 matching lines...) Expand 10 before | Expand all | Expand 10 after
559 559
560 ShowScreenWithData(OobeScreen::SCREEN_OOBE_ENROLLMENT, &screen_data); 560 ShowScreenWithData(OobeScreen::SCREEN_OOBE_ENROLLMENT, &screen_data);
561 if (first_show_) { 561 if (first_show_) {
562 first_show_ = false; 562 first_show_ = false;
563 UpdateStateInternal(NetworkError::ERROR_REASON_UPDATE, true); 563 UpdateStateInternal(NetworkError::ERROR_REASON_UPDATE, true);
564 } 564 }
565 histogram_helper_->OnScreenShow(); 565 histogram_helper_->OnScreenShow();
566 } 566 }
567 567
568 } // namespace chromeos 568 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/sync/sync_ui_util_unittest.cc ('k') | components/signin/core/browser/signin_error_controller_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698