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

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

Issue 1355063004: Template methods on Timer classes instead of the classes themselves. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: timer: fixcaller Created 5 years, 3 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/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
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
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/login/screens/update_screen.h ('k') | chrome/browser/chromeos/login/screens/user_selection_screen.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698