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/update_screen.h" | 5 #include "chrome/browser/chromeos/login/screens/update_screen.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/files/file_util.h" | 10 #include "base/files/file_util.h" |
(...skipping 575 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
586 void UpdateScreen::DelayErrorMessage() { | 586 void UpdateScreen::DelayErrorMessage() { |
587 if (error_message_timer_.IsRunning()) | 587 if (error_message_timer_.IsRunning()) |
588 return; | 588 return; |
589 | 589 |
590 state_ = STATE_ERROR; | 590 state_ = STATE_ERROR; |
591 error_message_timer_.Start( | 591 error_message_timer_.Start( |
592 FROM_HERE, base::TimeDelta::FromSeconds(kDelayErrorMessageSec), this, | 592 FROM_HERE, base::TimeDelta::FromSeconds(kDelayErrorMessageSec), this, |
593 &UpdateScreen::ShowErrorMessage); | 593 &UpdateScreen::ShowErrorMessage); |
594 } | 594 } |
595 | 595 |
596 base::OneShotTimer<UpdateScreen>& | 596 base::OneShotTimer& UpdateScreen::GetErrorMessageTimerForTesting() { |
597 UpdateScreen::GetErrorMessageTimerForTesting() { | |
598 return error_message_timer_; | 597 return error_message_timer_; |
599 } | 598 } |
600 | 599 |
601 void UpdateScreen::OnConnectRequested() { | 600 void UpdateScreen::OnConnectRequested() { |
602 if (state_ == STATE_ERROR) { | 601 if (state_ == STATE_ERROR) { |
603 LOG(WARNING) << "Hiding error message since AP was reselected"; | 602 LOG(WARNING) << "Hiding error message since AP was reselected"; |
604 StartUpdateCheck(); | 603 StartUpdateCheck(); |
605 } | 604 } |
606 } | 605 } |
607 | 606 |
608 } // namespace chromeos | 607 } // namespace chromeos |
OLD | NEW |