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

Side by Side Diff: chrome/browser/chromeos/login/existing_user_controller.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, 2 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/existing_user_controller.h" 5 #include "chrome/browser/chromeos/login/existing_user_controller.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/bind_helpers.h" 10 #include "base/bind_helpers.h"
(...skipping 883 matching lines...) Expand 10 before | Expand all | Expand 10 after
894 894
895 void ExistingUserController::StartPublicSessionAutoLoginTimer() { 895 void ExistingUserController::StartPublicSessionAutoLoginTimer() {
896 if (!signin_screen_ready_ || 896 if (!signin_screen_ready_ ||
897 is_login_in_progress_ || 897 is_login_in_progress_ ||
898 public_session_auto_login_username_.empty()) { 898 public_session_auto_login_username_.empty()) {
899 return; 899 return;
900 } 900 }
901 901
902 // Start the auto-login timer. 902 // Start the auto-login timer.
903 if (!auto_login_timer_) 903 if (!auto_login_timer_)
904 auto_login_timer_.reset(new base::OneShotTimer<ExistingUserController>); 904 auto_login_timer_.reset(new base::OneShotTimer);
905 905
906 auto_login_timer_->Start( 906 auto_login_timer_->Start(
907 FROM_HERE, 907 FROM_HERE,
908 base::TimeDelta::FromMilliseconds( 908 base::TimeDelta::FromMilliseconds(
909 public_session_auto_login_delay_), 909 public_session_auto_login_delay_),
910 base::Bind( 910 base::Bind(
911 &ExistingUserController::OnPublicSessionAutoLoginTimerFire, 911 &ExistingUserController::OnPublicSessionAutoLoginTimerFire,
912 weak_factory_.GetWeakPtr())); 912 weak_factory_.GetWeakPtr()));
913 } 913 }
914 914
(...skipping 288 matching lines...) Expand 10 before | Expand all | Expand 10 after
1203 if (!success) { 1203 if (!success) {
1204 LOG(ERROR) << "OAuth2 token fetch failed."; 1204 LOG(ERROR) << "OAuth2 token fetch failed.";
1205 OnAuthFailure(AuthFailure(AuthFailure::FAILED_TO_INITIALIZE_TOKEN)); 1205 OnAuthFailure(AuthFailure(AuthFailure::FAILED_TO_INITIALIZE_TOKEN));
1206 return; 1206 return;
1207 } 1207 }
1208 UserSessionManager::GetInstance()->OnOAuth2TokensFetched(user_context); 1208 UserSessionManager::GetInstance()->OnOAuth2TokensFetched(user_context);
1209 PerformLogin(user_context, LoginPerformer::AUTH_MODE_EXTENSION); 1209 PerformLogin(user_context, LoginPerformer::AUTH_MODE_EXTENSION);
1210 } 1210 }
1211 1211
1212 } // namespace chromeos 1212 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698