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/screen_locker.cc

Issue 12502017: signin: pull basic SigninManager functionality into new SigninManagerBase class. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix override Created 7 years, 8 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 | Annotate | Revision Log
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/screen_locker.h" 5 #include "chrome/browser/chromeos/login/screen_locker.h"
6 6
7 #include <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "ash/ash_switches.h" 10 #include "ash/ash_switches.h"
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after
192 } else { 192 } else {
193 base::TimeDelta delta = base::Time::Now() - authentication_start_time_; 193 base::TimeDelta delta = base::Time::Now() - authentication_start_time_;
194 VLOG(1) << "Authentication success: " << delta.InSecondsF() << " second(s)"; 194 VLOG(1) << "Authentication success: " << delta.InSecondsF() << " second(s)";
195 UMA_HISTOGRAM_TIMES("ScreenLocker.AuthenticationSuccessTime", delta); 195 UMA_HISTOGRAM_TIMES("ScreenLocker.AuthenticationSuccessTime", delta);
196 } 196 }
197 197
198 Profile* profile = ProfileManager::GetDefaultProfile(); 198 Profile* profile = ProfileManager::GetDefaultProfile();
199 if (profile && !user_context.password.empty()) { 199 if (profile && !user_context.password.empty()) {
200 // We have a non-empty password, so notify listeners (such as the sync 200 // We have a non-empty password, so notify listeners (such as the sync
201 // engine). 201 // engine).
202 SigninManager* signin = SigninManagerFactory::GetForProfile(profile); 202 SigninManagerBase* signin = SigninManagerFactory::GetForProfile(profile);
203 DCHECK(signin); 203 DCHECK(signin);
204 GoogleServiceSigninSuccessDetails details( 204 GoogleServiceSigninSuccessDetails details(
205 signin->GetAuthenticatedUsername(), 205 signin->GetAuthenticatedUsername(),
206 user_context.password); 206 user_context.password);
207 content::NotificationService::current()->Notify( 207 content::NotificationService::current()->Notify(
208 chrome::NOTIFICATION_GOOGLE_SIGNIN_SUCCESSFUL, 208 chrome::NOTIFICATION_GOOGLE_SIGNIN_SUCCESSFUL,
209 content::Source<Profile>(profile), 209 content::Source<Profile>(profile),
210 content::Details<const GoogleServiceSigninSuccessDetails>(&details)); 210 content::Details<const GoogleServiceSigninSuccessDetails>(&details));
211 } 211 }
212 212
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after
426 content::Details<bool>(&state)); 426 content::Details<bool>(&state));
427 VLOG(1) << "Calling session manager's HandleLockScreenShown D-Bus method"; 427 VLOG(1) << "Calling session manager's HandleLockScreenShown D-Bus method";
428 DBusThreadManager::Get()->GetSessionManagerClient()->NotifyLockScreenShown(); 428 DBusThreadManager::Get()->GetSessionManagerClient()->NotifyLockScreenShown();
429 } 429 }
430 430
431 content::WebUI* ScreenLocker::GetAssociatedWebUI() { 431 content::WebUI* ScreenLocker::GetAssociatedWebUI() {
432 return delegate_->GetAssociatedWebUI(); 432 return delegate_->GetAssociatedWebUI();
433 } 433 }
434 434
435 } // namespace chromeos 435 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698