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

Side by Side Diff: chrome/browser/chromeos/login/wizard_controller.cc

Issue 306993004: Remove the option to skip auto-update checks on OOBE. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 6 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/chromeos/login/wizard_controller.h" 5 #include "chrome/browser/chromeos/login/wizard_controller.h"
6 6
7 #include <signal.h> 7 #include <signal.h>
8 #include <stdlib.h> 8 #include <stdlib.h>
9 #include <sys/types.h> 9 #include <sys/types.h>
10 10
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
162 previous_screen_(NULL), 162 previous_screen_(NULL),
163 #if defined(GOOGLE_CHROME_BUILD) 163 #if defined(GOOGLE_CHROME_BUILD)
164 is_official_build_(true), 164 is_official_build_(true),
165 #else 165 #else
166 is_official_build_(false), 166 is_official_build_(false),
167 #endif 167 #endif
168 is_out_of_box_(false), 168 is_out_of_box_(false),
169 host_(host), 169 host_(host),
170 oobe_display_(oobe_display), 170 oobe_display_(oobe_display),
171 usage_statistics_reporting_(true), 171 usage_statistics_reporting_(true),
172 skip_update_enroll_after_eula_(false),
173 login_screen_started_(false), 172 login_screen_started_(false),
174 user_image_screen_return_to_previous_hack_(false), 173 user_image_screen_return_to_previous_hack_(false),
175 timezone_resolved_(false), 174 timezone_resolved_(false),
176 weak_factory_(this) { 175 weak_factory_(this) {
177 DCHECK(default_controller_ == NULL); 176 DCHECK(default_controller_ == NULL);
178 default_controller_ = this; 177 default_controller_ = this;
179 AccessibilityManager* accessibility_manager = AccessibilityManager::Get(); 178 AccessibilityManager* accessibility_manager = AccessibilityManager::Get();
180 CHECK(accessibility_manager); 179 CHECK(accessibility_manager);
181 accessibility_subscription_ = accessibility_manager->RegisterCallback( 180 accessibility_subscription_ = accessibility_manager->RegisterCallback(
182 base::Bind(&WizardController::OnAccessibilityStatusChanged, 181 base::Bind(&WizardController::OnAccessibilityStatusChanged,
(...skipping 331 matching lines...) Expand 10 before | Expand all | Expand 10 after
514 } 513 }
515 514
516 void WizardController::RemoveObserver(Observer* observer) { 515 void WizardController::RemoveObserver(Observer* observer) {
517 observer_list_.RemoveObserver(observer); 516 observer_list_.RemoveObserver(observer);
518 } 517 }
519 518
520 void WizardController::OnSessionStart() { 519 void WizardController::OnSessionStart() {
521 FOR_EACH_OBSERVER(Observer, observer_list_, OnSessionStart()); 520 FOR_EACH_OBSERVER(Observer, observer_list_, OnSessionStart());
522 } 521 }
523 522
524 void WizardController::SkipUpdateEnrollAfterEula() {
525 skip_update_enroll_after_eula_ = true;
526 }
527
528 /////////////////////////////////////////////////////////////////////////////// 523 ///////////////////////////////////////////////////////////////////////////////
529 // WizardController, ExitHandlers: 524 // WizardController, ExitHandlers:
530 void WizardController::OnHIDDetectionCompleted() { 525 void WizardController::OnHIDDetectionCompleted() {
531 ShowNetworkScreen(); 526 ShowNetworkScreen();
532 } 527 }
533 528
534 void WizardController::OnNetworkConnected() { 529 void WizardController::OnNetworkConnected() {
535 if (is_official_build_) { 530 if (is_official_build_) {
536 if (!StartupUtils::IsEulaAccepted()) { 531 if (!StartupUtils::IsEulaAccepted()) {
537 ShowEulaScreen(); 532 ShowEulaScreen();
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
570 565
571 CrosSettings::Get()->SetBoolean(kStatsReportingPref, uma_enabled); 566 CrosSettings::Get()->SetBoolean(kStatsReportingPref, uma_enabled);
572 if (uma_enabled) { 567 if (uma_enabled) {
573 #if defined(GOOGLE_CHROME_BUILD) 568 #if defined(GOOGLE_CHROME_BUILD)
574 // The crash reporter initialization needs IO to complete. 569 // The crash reporter initialization needs IO to complete.
575 base::ThreadRestrictions::ScopedAllowIO allow_io; 570 base::ThreadRestrictions::ScopedAllowIO allow_io;
576 breakpad::InitCrashReporter(std::string()); 571 breakpad::InitCrashReporter(std::string());
577 #endif 572 #endif
578 } 573 }
579 574
580 if (skip_update_enroll_after_eula_) { 575 InitiateOOBEUpdate();
581 PerformPostEulaActions();
582 PerformOOBECompletedActions();
583 ShowEnrollmentScreen();
584 } else {
585 InitiateOOBEUpdate();
586 }
587 } 576 }
588 577
589 void WizardController::OnUpdateErrorCheckingForUpdate() { 578 void WizardController::OnUpdateErrorCheckingForUpdate() {
590 // TODO(nkostylev): Update should be required during OOBE. 579 // TODO(nkostylev): Update should be required during OOBE.
591 // We do not want to block users from being able to proceed to the login 580 // We do not want to block users from being able to proceed to the login
592 // screen if there is any error checking for an update. 581 // screen if there is any error checking for an update.
593 // They could use "browse without sign-in" feature to set up the network to be 582 // They could use "browse without sign-in" feature to set up the network to be
594 // able to perform the update later. 583 // able to perform the update later.
595 OnUpdateCompleted(); 584 OnUpdateCompleted();
596 } 585 }
(...skipping 510 matching lines...) Expand 10 before | Expand all | Expand 10 after
1107 bool WizardController::SetOnTimeZoneResolvedForTesting( 1096 bool WizardController::SetOnTimeZoneResolvedForTesting(
1108 const base::Closure& callback) { 1097 const base::Closure& callback) {
1109 if (timezone_resolved_) 1098 if (timezone_resolved_)
1110 return false; 1099 return false;
1111 1100
1112 on_timezone_resolved_for_testing_ = callback; 1101 on_timezone_resolved_for_testing_ = callback;
1113 return true; 1102 return true;
1114 } 1103 }
1115 1104
1116 } // namespace chromeos 1105 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/login/wizard_controller.h ('k') | chrome/browser/chromeos/login/wizard_controller_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698