Chromium Code Reviews| Index: chrome/browser/chromeos/login/wizard_controller.cc |
| diff --git a/chrome/browser/chromeos/login/wizard_controller.cc b/chrome/browser/chromeos/login/wizard_controller.cc |
| index a5be676dd96b5d2a4fd8ebc160019636e0b73720..5cc297e11facb8f8107346bf9c0a559be8878345 100644 |
| --- a/chrome/browser/chromeos/login/wizard_controller.cc |
| +++ b/chrome/browser/chromeos/login/wizard_controller.cc |
| @@ -184,6 +184,11 @@ bool IsSharkRequisition() { |
| return policy_manager && policy_manager->IsSharkRequisition(); |
| } |
| +bool IsCellularFirstDevice() { |
|
xiyuan
2017/02/28 20:26:41
Maybe we should move this into chromeos_swithces.h
kumarniranjan
2017/02/28 21:49:33
Done.
|
| + return base::CommandLine::ForCurrentProcess()->HasSwitch( |
| + chromeos::switches::kCellularFirst); |
| +} |
| + |
| // Checks if a controller device ("Master") is detected during the bootstrapping |
| // or shark/remora setup process. |
| bool IsControllerDetected() { |
| @@ -890,6 +895,20 @@ void WizardController::InitiateOOBEUpdate() { |
| return; |
| } |
| + // If this is a Cellular First device, instruct UpdateEngine to allow |
| + // updates over cellular data connections. |
| + if (IsCellularFirstDevice()) { |
| + DBusThreadManager::Get() |
| + ->GetUpdateEngineClient() |
| + ->SetUpdateOverCellularPermission( |
| + true, base::Bind(&WizardController::InitiateOOBEUpdateHelper, |
| + weak_factory_.GetWeakPtr())); |
| + } else { |
| + InitiateOOBEUpdateHelper(); |
| + } |
| +} |
| + |
| +void WizardController::InitiateOOBEUpdateHelper() { |
| VLOG(1) << "InitiateOOBEUpdate"; |
| SetCurrentScreenSmooth(GetScreen(OobeScreen::SCREEN_OOBE_UPDATE), true); |
| UpdateScreen::Get(this)->StartNetworkCheck(); |