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

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

Issue 2694923005: Appropriate handling for Cellular First devices. (Closed)
Patch Set: made a couple of tweaks 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 872 matching lines...) Expand 10 before | Expand all | Expand 10 after
883 } 883 }
884 } 884 }
885 885
886 void WizardController::InitiateOOBEUpdate() { 886 void WizardController::InitiateOOBEUpdate() {
887 if (IsRemoraRequisition()) { 887 if (IsRemoraRequisition()) {
888 VLOG(1) << "Skip OOBE Update for remora."; 888 VLOG(1) << "Skip OOBE Update for remora.";
889 OnUpdateCompleted(); 889 OnUpdateCompleted();
890 return; 890 return;
891 } 891 }
892 892
893 // If this is a Cellular First device, instruct UpdateEngine to allow
894 // updates over cellular data connections.
895 if (chromeos::switches::IsCellularFirstDevice()) {
896 DBusThreadManager::Get()
897 ->GetUpdateEngineClient()
898 ->SetUpdateOverCellularPermission(
899 true, base::Bind(&WizardController::InitiateOOBEUpdateHelper,
900 weak_factory_.GetWeakPtr()));
901 } else {
902 InitiateOOBEUpdateHelper();
903 }
904 }
905
906 void WizardController::InitiateOOBEUpdateHelper() {
893 VLOG(1) << "InitiateOOBEUpdate"; 907 VLOG(1) << "InitiateOOBEUpdate";
stevenjb 2017/03/01 23:11:56 We should make this method more descriptive (e.g.
kumarniranjan 2017/03/02 00:29:34 Done.
894 SetCurrentScreenSmooth(GetScreen(OobeScreen::SCREEN_OOBE_UPDATE), true); 908 SetCurrentScreenSmooth(GetScreen(OobeScreen::SCREEN_OOBE_UPDATE), true);
895 UpdateScreen::Get(this)->StartNetworkCheck(); 909 UpdateScreen::Get(this)->StartNetworkCheck();
896 } 910 }
897 911
898 void WizardController::StartTimezoneResolve() { 912 void WizardController::StartTimezoneResolve() {
899 geolocation_provider_.reset(new SimpleGeolocationProvider( 913 geolocation_provider_.reset(new SimpleGeolocationProvider(
900 g_browser_process->system_request_context(), 914 g_browser_process->system_request_context(),
901 SimpleGeolocationProvider::DefaultGeolocationProviderURL())); 915 SimpleGeolocationProvider::DefaultGeolocationProviderURL()));
902 geolocation_provider_->RequestGeolocation( 916 geolocation_provider_->RequestGeolocation(
903 base::TimeDelta::FromSeconds(kResolveTimeZoneTimeoutSeconds), 917 base::TimeDelta::FromSeconds(kResolveTimeZoneTimeoutSeconds),
(...skipping 604 matching lines...) Expand 10 before | Expand all | Expand 10 after
1508 : policy::EnrollmentConfig::MODE_MANUAL_REENROLLMENT; 1522 : policy::EnrollmentConfig::MODE_MANUAL_REENROLLMENT;
1509 } 1523 }
1510 1524
1511 EnrollmentScreen* screen = EnrollmentScreen::Get(this); 1525 EnrollmentScreen* screen = EnrollmentScreen::Get(this);
1512 screen->SetParameters(effective_config, shark_controller_.get()); 1526 screen->SetParameters(effective_config, shark_controller_.get());
1513 SetStatusAreaVisible(true); 1527 SetStatusAreaVisible(true);
1514 SetCurrentScreen(screen); 1528 SetCurrentScreen(screen);
1515 } 1529 }
1516 1530
1517 } // namespace chromeos 1531 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698