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

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

Issue 313923005: Revert 273875 "Remove the option to skip auto-update checks on OOBE." (Closed) Base URL: svn://svn.chromium.org/chrome/
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 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 previous_screen_(NULL), 164 previous_screen_(NULL),
165 #if defined(GOOGLE_CHROME_BUILD) 165 #if defined(GOOGLE_CHROME_BUILD)
166 is_official_build_(true), 166 is_official_build_(true),
167 #else 167 #else
168 is_official_build_(false), 168 is_official_build_(false),
169 #endif 169 #endif
170 is_out_of_box_(false), 170 is_out_of_box_(false),
171 host_(host), 171 host_(host),
172 oobe_display_(oobe_display), 172 oobe_display_(oobe_display),
173 usage_statistics_reporting_(true), 173 usage_statistics_reporting_(true),
174 skip_update_enroll_after_eula_(false),
174 login_screen_started_(false), 175 login_screen_started_(false),
175 user_image_screen_return_to_previous_hack_(false), 176 user_image_screen_return_to_previous_hack_(false),
176 timezone_resolved_(false), 177 timezone_resolved_(false),
177 weak_factory_(this) { 178 weak_factory_(this) {
178 DCHECK(default_controller_ == NULL); 179 DCHECK(default_controller_ == NULL);
179 default_controller_ = this; 180 default_controller_ = this;
180 AccessibilityManager* accessibility_manager = AccessibilityManager::Get(); 181 AccessibilityManager* accessibility_manager = AccessibilityManager::Get();
181 CHECK(accessibility_manager); 182 CHECK(accessibility_manager);
182 accessibility_subscription_ = accessibility_manager->RegisterCallback( 183 accessibility_subscription_ = accessibility_manager->RegisterCallback(
183 base::Bind(&WizardController::OnAccessibilityStatusChanged, 184 base::Bind(&WizardController::OnAccessibilityStatusChanged,
(...skipping 345 matching lines...) Expand 10 before | Expand all | Expand 10 after
529 } 530 }
530 531
531 void WizardController::RemoveObserver(Observer* observer) { 532 void WizardController::RemoveObserver(Observer* observer) {
532 observer_list_.RemoveObserver(observer); 533 observer_list_.RemoveObserver(observer);
533 } 534 }
534 535
535 void WizardController::OnSessionStart() { 536 void WizardController::OnSessionStart() {
536 FOR_EACH_OBSERVER(Observer, observer_list_, OnSessionStart()); 537 FOR_EACH_OBSERVER(Observer, observer_list_, OnSessionStart());
537 } 538 }
538 539
540 void WizardController::SkipUpdateEnrollAfterEula() {
541 skip_update_enroll_after_eula_ = true;
542 }
543
539 /////////////////////////////////////////////////////////////////////////////// 544 ///////////////////////////////////////////////////////////////////////////////
540 // WizardController, ExitHandlers: 545 // WizardController, ExitHandlers:
541 void WizardController::OnHIDDetectionCompleted() { 546 void WizardController::OnHIDDetectionCompleted() {
542 ShowNetworkScreen(); 547 ShowNetworkScreen();
543 } 548 }
544 549
545 void WizardController::OnNetworkConnected() { 550 void WizardController::OnNetworkConnected() {
546 if (is_official_build_) { 551 if (is_official_build_) {
547 if (!StartupUtils::IsEulaAccepted()) { 552 if (!StartupUtils::IsEulaAccepted()) {
548 ShowEulaScreen(); 553 ShowEulaScreen();
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
581 586
582 CrosSettings::Get()->SetBoolean(kStatsReportingPref, uma_enabled); 587 CrosSettings::Get()->SetBoolean(kStatsReportingPref, uma_enabled);
583 if (uma_enabled) { 588 if (uma_enabled) {
584 #if defined(GOOGLE_CHROME_BUILD) 589 #if defined(GOOGLE_CHROME_BUILD)
585 // The crash reporter initialization needs IO to complete. 590 // The crash reporter initialization needs IO to complete.
586 base::ThreadRestrictions::ScopedAllowIO allow_io; 591 base::ThreadRestrictions::ScopedAllowIO allow_io;
587 breakpad::InitCrashReporter(std::string()); 592 breakpad::InitCrashReporter(std::string());
588 #endif 593 #endif
589 } 594 }
590 595
591 InitiateOOBEUpdate(); 596 if (skip_update_enroll_after_eula_) {
597 PerformPostEulaActions();
598 PerformOOBECompletedActions();
599 ShowEnrollmentScreen();
600 } else {
601 InitiateOOBEUpdate();
602 }
592 } 603 }
593 604
594 void WizardController::OnUpdateErrorCheckingForUpdate() { 605 void WizardController::OnUpdateErrorCheckingForUpdate() {
595 // TODO(nkostylev): Update should be required during OOBE. 606 // TODO(nkostylev): Update should be required during OOBE.
596 // We do not want to block users from being able to proceed to the login 607 // We do not want to block users from being able to proceed to the login
597 // screen if there is any error checking for an update. 608 // screen if there is any error checking for an update.
598 // They could use "browse without sign-in" feature to set up the network to be 609 // They could use "browse without sign-in" feature to set up the network to be
599 // able to perform the update later. 610 // able to perform the update later.
600 OnUpdateCompleted(); 611 OnUpdateCompleted();
601 } 612 }
(...skipping 505 matching lines...) Expand 10 before | Expand all | Expand 10 after
1107 bool WizardController::SetOnTimeZoneResolvedForTesting( 1118 bool WizardController::SetOnTimeZoneResolvedForTesting(
1108 const base::Closure& callback) { 1119 const base::Closure& callback) {
1109 if (timezone_resolved_) 1120 if (timezone_resolved_)
1110 return false; 1121 return false;
1111 1122
1112 on_timezone_resolved_for_testing_ = callback; 1123 on_timezone_resolved_for_testing_ = callback;
1113 return true; 1124 return true;
1114 } 1125 }
1115 1126
1116 } // namespace chromeos 1127 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698