| OLD | NEW |
| 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 345 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 if (is_connected && continue_attempts_ == 0 && | 363 if (is_connected && continue_attempts_ == 0 && |
| 364 policy::DeviceCloudPolicyManagerChromeOS::GetZeroTouchEnrollmentMode() == | 364 policy::DeviceCloudPolicyManagerChromeOS::GetZeroTouchEnrollmentMode() == |
| 365 policy::ZeroTouchEnrollmentMode::HANDS_OFF) { | 365 policy::ZeroTouchEnrollmentMode::HANDS_OFF) { |
| 366 OnContinueButtonPressed(); | 366 // Call OnContinueButtonPressed after 3 minutes. |
| 367 base::ThreadTaskRunnerHandle::Get()->PostDelayedTask( |
| 368 FROM_HERE, |
| 369 base::Bind(&NetworkScreen::OnContinueButtonPressed, |
| 370 weak_factory_.GetWeakPtr()), |
| 371 base::TimeDelta::FromMinutes(3)); |
| 367 } | 372 } |
| 368 } | 373 } |
| 369 | 374 |
| 370 void NetworkScreen::WaitForConnection(const base::string16& network_id) { | 375 void NetworkScreen::WaitForConnection(const base::string16& network_id) { |
| 371 if (network_id_ != network_id || !connection_timer_.IsRunning()) { | 376 if (network_id_ != network_id || !connection_timer_.IsRunning()) { |
| 372 connection_timer_.Stop(); | 377 connection_timer_.Stop(); |
| 373 connection_timer_.Start(FROM_HERE, | 378 connection_timer_.Start(FROM_HERE, |
| 374 base::TimeDelta::FromSeconds(kConnectionTimeoutSec), | 379 base::TimeDelta::FromSeconds(kConnectionTimeoutSec), |
| 375 this, | 380 this, |
| 376 &NetworkScreen::OnConnectionTimeout); | 381 &NetworkScreen::OnConnectionTimeout); |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 441 observer.OnLanguageListReloaded(); | 446 observer.OnLanguageListReloaded(); |
| 442 } | 447 } |
| 443 | 448 |
| 444 void NetworkScreen::OnSystemTimezoneChanged() { | 449 void NetworkScreen::OnSystemTimezoneChanged() { |
| 445 std::string current_timezone_id; | 450 std::string current_timezone_id; |
| 446 CrosSettings::Get()->GetString(kSystemTimezone, ¤t_timezone_id); | 451 CrosSettings::Get()->GetString(kSystemTimezone, ¤t_timezone_id); |
| 447 GetContextEditor().SetString(kContextKeyTimezone, current_timezone_id); | 452 GetContextEditor().SetString(kContextKeyTimezone, current_timezone_id); |
| 448 } | 453 } |
| 449 | 454 |
| 450 } // namespace chromeos | 455 } // namespace chromeos |
| OLD | NEW |