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

Side by Side Diff: chrome/browser/chromeos/login/screens/network_screen.cc

Issue 2854393003: Remove 3 minute OOBE delay. (Closed)
Patch Set: Created 3 years, 7 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
« no previous file with comments | « no previous file | chrome/browser/chromeos/login/screens/network_screen_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/screens/network_screen.h" 5 #include "chrome/browser/chromeos/login/screens/network_screen.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/location.h" 9 #include "base/location.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 342 matching lines...) Expand 10 before | Expand all | Expand 10 after
353 } 353 }
354 354
355 continue_pressed_ = false; 355 continue_pressed_ = false;
356 connection_timer_.Stop(); 356 connection_timer_.Stop();
357 357
358 network_id_ = network_id; 358 network_id_ = network_id;
359 if (view_) 359 if (view_)
360 view_->ShowConnectingStatus(false, network_id_); 360 view_->ShowConnectingStatus(false, network_id_);
361 361
362 GetContextEditor().SetBoolean(kContextKeyContinueButtonEnabled, is_connected); 362 GetContextEditor().SetBoolean(kContextKeyContinueButtonEnabled, is_connected);
363
364 // Automatically continue if we are using Hands-Off Enrollment.
363 if (is_connected && continue_attempts_ == 0 && 365 if (is_connected && continue_attempts_ == 0 &&
364 policy::DeviceCloudPolicyManagerChromeOS::GetZeroTouchEnrollmentMode() == 366 policy::DeviceCloudPolicyManagerChromeOS::GetZeroTouchEnrollmentMode() ==
365 policy::ZeroTouchEnrollmentMode::HANDS_OFF) { 367 policy::ZeroTouchEnrollmentMode::HANDS_OFF) {
366 // Call OnContinueButtonPressed after 3 minutes. 368 OnContinueButtonPressed();
367 base::ThreadTaskRunnerHandle::Get()->PostDelayedTask(
368 FROM_HERE,
369 base::Bind(&NetworkScreen::OnContinueButtonPressed,
370 weak_factory_.GetWeakPtr()),
371 base::TimeDelta::FromMinutes(3));
372 } 369 }
373 } 370 }
374 371
375 void NetworkScreen::WaitForConnection(const base::string16& network_id) { 372 void NetworkScreen::WaitForConnection(const base::string16& network_id) {
376 if (network_id_ != network_id || !connection_timer_.IsRunning()) { 373 if (network_id_ != network_id || !connection_timer_.IsRunning()) {
377 connection_timer_.Stop(); 374 connection_timer_.Stop();
378 connection_timer_.Start(FROM_HERE, 375 connection_timer_.Start(FROM_HERE,
379 base::TimeDelta::FromSeconds(kConnectionTimeoutSec), 376 base::TimeDelta::FromSeconds(kConnectionTimeoutSec),
380 this, 377 this,
381 &NetworkScreen::OnConnectionTimeout); 378 &NetworkScreen::OnConnectionTimeout);
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
446 observer.OnLanguageListReloaded(); 443 observer.OnLanguageListReloaded();
447 } 444 }
448 445
449 void NetworkScreen::OnSystemTimezoneChanged() { 446 void NetworkScreen::OnSystemTimezoneChanged() {
450 std::string current_timezone_id; 447 std::string current_timezone_id;
451 CrosSettings::Get()->GetString(kSystemTimezone, &current_timezone_id); 448 CrosSettings::Get()->GetString(kSystemTimezone, &current_timezone_id);
452 GetContextEditor().SetString(kContextKeyTimezone, current_timezone_id); 449 GetContextEditor().SetString(kContextKeyTimezone, current_timezone_id);
453 } 450 }
454 451
455 } // namespace chromeos 452 } // namespace chromeos
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/chromeos/login/screens/network_screen_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698