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

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

Issue 214963002: Add error message for domain mismatch on re-enrollment. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Move message declaration in policy_strings.grdp to work around an Android build issue. Created 6 years, 8 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 | Annotate | Revision Log
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 221 matching lines...) Expand 10 before | Expand all | Expand 10 after
232 232
233 void EnrollmentScreenHandler::ShowEnrollmentStatus( 233 void EnrollmentScreenHandler::ShowEnrollmentStatus(
234 policy::EnrollmentStatus status) { 234 policy::EnrollmentStatus status) {
235 switch (status.status()) { 235 switch (status.status()) {
236 case policy::EnrollmentStatus::STATUS_SUCCESS: 236 case policy::EnrollmentStatus::STATUS_SUCCESS:
237 ShowStep(kEnrollmentStepSuccess); 237 ShowStep(kEnrollmentStepSuccess);
238 return; 238 return;
239 case policy::EnrollmentStatus::STATUS_REGISTRATION_FAILED: 239 case policy::EnrollmentStatus::STATUS_REGISTRATION_FAILED:
240 // Some special cases for generating a nicer message that's more helpful. 240 // Some special cases for generating a nicer message that's more helpful.
241 switch (status.client_status()) { 241 switch (status.client_status()) {
242 case policy::DM_STATUS_SERVICE_MANAGEMENT_NOT_SUPPORTED:
243 ShowError(IDS_ENTERPRISE_ENROLLMENT_ACCOUNT_ERROR, true);
244 break;
242 case policy::DM_STATUS_SERVICE_MISSING_LICENSES: 245 case policy::DM_STATUS_SERVICE_MISSING_LICENSES:
243 ShowError(IDS_ENTERPRISE_ENROLLMENT_MISSING_LICENSES_ERROR, true); 246 ShowError(IDS_ENTERPRISE_ENROLLMENT_MISSING_LICENSES_ERROR, true);
244 break; 247 break;
245 case policy::DM_STATUS_SERVICE_DEPROVISIONED: 248 case policy::DM_STATUS_SERVICE_DEPROVISIONED:
246 ShowError(IDS_ENTERPRISE_ENROLLMENT_DEPROVISIONED_ERROR, true); 249 ShowError(IDS_ENTERPRISE_ENROLLMENT_DEPROVISIONED_ERROR, true);
247 break; 250 break;
248 case policy::DM_STATUS_SERVICE_MANAGEMENT_NOT_SUPPORTED: 251 case policy::DM_STATUS_SERVICE_DOMAIN_MISMATCH:
249 ShowError(IDS_ENTERPRISE_ENROLLMENT_ACCOUNT_ERROR, true); 252 ShowError(IDS_ENTERPRISE_ENROLLMENT_DOMAIN_MISMATCH_ERROR, true);
250 break; 253 break;
251 default: 254 default:
252 ShowErrorMessage( 255 ShowErrorMessage(
253 l10n_util::GetStringFUTF8( 256 l10n_util::GetStringFUTF8(
254 IDS_ENTERPRISE_ENROLLMENT_STATUS_REGISTRATION_FAILED, 257 IDS_ENTERPRISE_ENROLLMENT_STATUS_REGISTRATION_FAILED,
255 policy::FormatDeviceManagementStatus(status.client_status())), 258 policy::FormatDeviceManagementStatus(status.client_status())),
256 true); 259 true);
257 } 260 }
258 return; 261 return;
259 case policy::EnrollmentStatus::STATUS_ROBOT_AUTH_FETCH_FAILED: 262 case policy::EnrollmentStatus::STATUS_ROBOT_AUTH_FETCH_FAILED:
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after
424 screen_data.SetString("signin_url", kGaiaExtStartPage); 427 screen_data.SetString("signin_url", kGaiaExtStartPage);
425 screen_data.SetString("gaiaUrl", GaiaUrls::GetInstance()->gaia_url().spec()); 428 screen_data.SetString("gaiaUrl", GaiaUrls::GetInstance()->gaia_url().spec());
426 screen_data.SetString("enrollment_mode", 429 screen_data.SetString("enrollment_mode",
427 EnrollmentModeToString(enrollment_mode_)); 430 EnrollmentModeToString(enrollment_mode_));
428 screen_data.SetString("management_domain", management_domain_); 431 screen_data.SetString("management_domain", management_domain_);
429 432
430 ShowScreen(OobeUI::kScreenOobeEnrollment, &screen_data); 433 ShowScreen(OobeUI::kScreenOobeEnrollment, &screen_data);
431 } 434 }
432 435
433 } // namespace chromeos 436 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/login/enrollment/enrollment_screen.cc ('k') | components/policy/core/browser/cloud/message_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698