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

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

Issue 2694923005: Appropriate handling for Cellular First devices. (Closed)
Patch Set: rebased Created 3 years, 9 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/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 <stddef.h> 8 #include <stddef.h>
9 #include <stdlib.h> 9 #include <stdlib.h>
10 #include <sys/types.h> 10 #include <sys/types.h>
(...skipping 859 matching lines...) Expand 10 before | Expand all | Expand 10 after
870 } 870 }
871 } 871 }
872 872
873 void WizardController::InitiateOOBEUpdate() { 873 void WizardController::InitiateOOBEUpdate() {
874 if (IsRemoraRequisition()) { 874 if (IsRemoraRequisition()) {
875 VLOG(1) << "Skip OOBE Update for remora."; 875 VLOG(1) << "Skip OOBE Update for remora.";
876 OnUpdateCompleted(); 876 OnUpdateCompleted();
877 return; 877 return;
878 } 878 }
879 879
880 VLOG(1) << "InitiateOOBEUpdate"; 880 // If this is a Cellular First device, instruct UpdateEngine to allow
881 // updates over cellular data connections.
882 if (chromeos::switches::IsCellularFirstDevice()) {
883 DBusThreadManager::Get()
884 ->GetUpdateEngineClient()
885 ->SetUpdateOverCellularPermission(
886 true, base::Bind(&WizardController::StartOOBEUpdate,
887 weak_factory_.GetWeakPtr()));
888 } else {
889 StartOOBEUpdate();
890 }
891 }
892
893 void WizardController::StartOOBEUpdate() {
894 VLOG(1) << "StartOOBEUpdate";
881 SetCurrentScreenSmooth(GetScreen(OobeScreen::SCREEN_OOBE_UPDATE), true); 895 SetCurrentScreenSmooth(GetScreen(OobeScreen::SCREEN_OOBE_UPDATE), true);
882 UpdateScreen::Get(this)->StartNetworkCheck(); 896 UpdateScreen::Get(this)->StartNetworkCheck();
883 } 897 }
884 898
885 void WizardController::StartTimezoneResolve() { 899 void WizardController::StartTimezoneResolve() {
886 geolocation_provider_.reset(new SimpleGeolocationProvider( 900 geolocation_provider_.reset(new SimpleGeolocationProvider(
887 g_browser_process->system_request_context(), 901 g_browser_process->system_request_context(),
888 SimpleGeolocationProvider::DefaultGeolocationProviderURL())); 902 SimpleGeolocationProvider::DefaultGeolocationProviderURL()));
889 geolocation_provider_->RequestGeolocation( 903 geolocation_provider_->RequestGeolocation(
890 base::TimeDelta::FromSeconds(kResolveTimeZoneTimeoutSeconds), 904 base::TimeDelta::FromSeconds(kResolveTimeZoneTimeoutSeconds),
(...skipping 601 matching lines...) Expand 10 before | Expand all | Expand 10 after
1492 : policy::EnrollmentConfig::MODE_MANUAL_REENROLLMENT; 1506 : policy::EnrollmentConfig::MODE_MANUAL_REENROLLMENT;
1493 } 1507 }
1494 1508
1495 EnrollmentScreen* screen = EnrollmentScreen::Get(this); 1509 EnrollmentScreen* screen = EnrollmentScreen::Get(this);
1496 screen->SetParameters(effective_config, shark_controller_.get()); 1510 screen->SetParameters(effective_config, shark_controller_.get());
1497 SetStatusAreaVisible(true); 1511 SetStatusAreaVisible(true);
1498 SetCurrentScreen(screen); 1512 SetCurrentScreen(screen);
1499 } 1513 }
1500 1514
1501 } // namespace chromeos 1515 } // 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