| 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/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 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 193 } else { | 193 } else { |
| 194 base::TimeDelta delta = base::Time::Now() - authentication_start_time_; | 194 base::TimeDelta delta = base::Time::Now() - authentication_start_time_; |
| 195 VLOG(1) << "Authentication success: " << delta.InSecondsF() << " second(s)"; | 195 VLOG(1) << "Authentication success: " << delta.InSecondsF() << " second(s)"; |
| 196 UMA_HISTOGRAM_TIMES("ScreenLocker.AuthenticationSuccessTime", delta); | 196 UMA_HISTOGRAM_TIMES("ScreenLocker.AuthenticationSuccessTime", delta); |
| 197 } | 197 } |
| 198 | 198 |
| 199 Profile* profile = ProfileManager::GetDefaultProfile(); | 199 Profile* profile = ProfileManager::GetDefaultProfile(); |
| 200 if (profile && !password.empty()) { | 200 if (profile && !password.empty()) { |
| 201 // We have a non-empty password, so notify listeners (such as the sync | 201 // We have a non-empty password, so notify listeners (such as the sync |
| 202 // engine). | 202 // engine). |
| 203 SigninManager* signin = SigninManagerFactory::GetForProfile(profile); | 203 SigninManagerBase* signin = |
| 204 SigninManagerFactory::GetBaseForProfile(profile); |
| 204 DCHECK(signin); | 205 DCHECK(signin); |
| 205 GoogleServiceSigninSuccessDetails details( | 206 GoogleServiceSigninSuccessDetails details( |
| 206 signin->GetAuthenticatedUsername(), | 207 signin->GetAuthenticatedUsername(), |
| 207 password); | 208 password); |
| 208 content::NotificationService::current()->Notify( | 209 content::NotificationService::current()->Notify( |
| 209 chrome::NOTIFICATION_GOOGLE_SIGNIN_SUCCESSFUL, | 210 chrome::NOTIFICATION_GOOGLE_SIGNIN_SUCCESSFUL, |
| 210 content::Source<Profile>(profile), | 211 content::Source<Profile>(profile), |
| 211 content::Details<const GoogleServiceSigninSuccessDetails>(&details)); | 212 content::Details<const GoogleServiceSigninSuccessDetails>(&details)); |
| 212 } | 213 } |
| 213 | 214 |
| (...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 422 content::Details<bool>(&state)); | 423 content::Details<bool>(&state)); |
| 423 VLOG(1) << "Calling session manager's HandleLockScreenShown D-Bus method"; | 424 VLOG(1) << "Calling session manager's HandleLockScreenShown D-Bus method"; |
| 424 DBusThreadManager::Get()->GetSessionManagerClient()->NotifyLockScreenShown(); | 425 DBusThreadManager::Get()->GetSessionManagerClient()->NotifyLockScreenShown(); |
| 425 } | 426 } |
| 426 | 427 |
| 427 content::WebUI* ScreenLocker::GetAssociatedWebUI() { | 428 content::WebUI* ScreenLocker::GetAssociatedWebUI() { |
| 428 return delegate_->GetAssociatedWebUI(); | 429 return delegate_->GetAssociatedWebUI(); |
| 429 } | 430 } |
| 430 | 431 |
| 431 } // namespace chromeos | 432 } // namespace chromeos |
| OLD | NEW |