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

Unified Diff: chrome/browser/chromeos/login/screen_locker.cc

Issue 10544043: Fix ScreenLocker to not send notifications with empty passwords. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Review feedback. Created 8 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/login/screen_locker.cc
diff --git a/chrome/browser/chromeos/login/screen_locker.cc b/chrome/browser/chromeos/login/screen_locker.cc
index 58984a0e0a476345284959b0e0936139f0e2529f..0822621efa7e16ce6b0b9ca7f4be2c42d36efba6 100644
--- a/chrome/browser/chromeos/login/screen_locker.cc
+++ b/chrome/browser/chromeos/login/screen_locker.cc
@@ -186,20 +186,18 @@ void ScreenLocker::OnLoginSuccess(
}
Profile* profile = ProfileManager::GetDefaultProfile();
- if (profile) {
- ProfileSyncService* service(
- ProfileSyncServiceFactory::GetInstance()->GetForProfile(profile));
- if (service && !service->HasSyncSetupCompleted()) {
- SigninManager* signin = SigninManagerFactory::GetForProfile(profile);
- DCHECK(signin);
- GoogleServiceSigninSuccessDetails details(
- signin->GetAuthenticatedUsername(),
- password);
- content::NotificationService::current()->Notify(
- chrome::NOTIFICATION_GOOGLE_SIGNIN_SUCCESSFUL,
- content::Source<Profile>(profile),
- content::Details<const GoogleServiceSigninSuccessDetails>(&details));
- }
+ if (profile && !password.empty()) {
+ // We have a non-empty password, so notify listeners (such as the sync
+ // engine).
+ SigninManager* signin = SigninManagerFactory::GetForProfile(profile);
+ DCHECK(signin);
+ GoogleServiceSigninSuccessDetails details(
+ signin->GetAuthenticatedUsername(),
+ password);
+ content::NotificationService::current()->Notify(
+ chrome::NOTIFICATION_GOOGLE_SIGNIN_SUCCESSFUL,
+ content::Source<Profile>(profile),
+ content::Details<const GoogleServiceSigninSuccessDetails>(&details));
}
DBusThreadManager::Get()->GetPowerManagerClient()->
NotifyScreenUnlockRequested();
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698