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

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

Issue 2371213002: Refactor: Inject StatisticsProvider as a dependency of DeviceCloudPolicyInitializer. (Closed)
Patch Set: Address Maksim's comments. Created 4 years, 2 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 "ash/common/system/chromeos/devicetype_utils.h" 9 #include "ash/common/system/chromeos/devicetype_utils.h"
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 327 matching lines...) Expand 10 before | Expand all | Expand 10 after
338 return; 338 return;
339 case policy::EnrollmentStatus::STATUS_STORE_TOKEN_AND_ID_FAILED: 339 case policy::EnrollmentStatus::STATUS_STORE_TOKEN_AND_ID_FAILED:
340 // This error should not happen for enterprise enrollment. 340 // This error should not happen for enterprise enrollment.
341 ShowError(IDS_ENTERPRISE_ENROLLMENT_STATUS_STORE_TOKEN_AND_ID_FAILED, 341 ShowError(IDS_ENTERPRISE_ENROLLMENT_STATUS_STORE_TOKEN_AND_ID_FAILED,
342 true); 342 true);
343 NOTREACHED(); 343 NOTREACHED();
344 return; 344 return;
345 case policy::EnrollmentStatus::STATUS_ATTRIBUTE_UPDATE_FAILED: 345 case policy::EnrollmentStatus::STATUS_ATTRIBUTE_UPDATE_FAILED:
346 ShowErrorForDevice(IDS_ENTERPRISE_ENROLLMENT_ATTRIBUTE_ERROR, false); 346 ShowErrorForDevice(IDS_ENTERPRISE_ENROLLMENT_ATTRIBUTE_ERROR, false);
347 return; 347 return;
348 case policy::EnrollmentStatus::STATUS_NO_MACHINE_IDENTIFICATION:
349 ShowError(IDS_ENTERPRISE_ENROLLMENT_STATUS_NO_MACHINE_IDENTIFICATION,
350 false);
351 return;
348 } 352 }
349 NOTREACHED(); 353 NOTREACHED();
350 } 354 }
351 355
352 // EnrollmentScreenHandler BaseScreenHandler implementation ----- 356 // EnrollmentScreenHandler BaseScreenHandler implementation -----
353 357
354 void EnrollmentScreenHandler::Initialize() { 358 void EnrollmentScreenHandler::Initialize() {
355 if (show_on_init_) { 359 if (show_on_init_) {
356 Show(); 360 Show();
357 show_on_init_ = false; 361 show_on_init_ = false;
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after
570 574
571 ShowScreenWithData(OobeScreen::SCREEN_OOBE_ENROLLMENT, &screen_data); 575 ShowScreenWithData(OobeScreen::SCREEN_OOBE_ENROLLMENT, &screen_data);
572 if (first_show_) { 576 if (first_show_) {
573 first_show_ = false; 577 first_show_ = false;
574 UpdateStateInternal(NetworkError::ERROR_REASON_UPDATE, true); 578 UpdateStateInternal(NetworkError::ERROR_REASON_UPDATE, true);
575 } 579 }
576 histogram_helper_->OnScreenShow(); 580 histogram_helper_->OnScreenShow();
577 } 581 }
578 582
579 } // namespace chromeos 583 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/policy/fake_device_cloud_policy_initializer.cc ('k') | chromeos/system/statistics_provider.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698