| 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 2d8ccd08ea5d0ed9f4e6899a2e923814298f6266..6b81138209bbc6cb8f0a0bac3b2a5bd441211435 100644
|
| --- a/chrome/browser/chromeos/login/screen_locker.cc
|
| +++ b/chrome/browser/chromeos/login/screen_locker.cc
|
| @@ -33,6 +33,8 @@
|
| #include "chrome/browser/chromeos/system_key_event_listener.h"
|
| #include "chrome/browser/chromeos/wm_ipc.h"
|
| #include "chrome/browser/metrics/user_metrics.h"
|
| +#include "chrome/browser/profile_manager.h"
|
| +#include "chrome/browser/sync/profile_sync_service.h"
|
| #include "chrome/browser/ui/browser.h"
|
| #include "chrome/common/chrome_switches.h"
|
| #include "chrome/common/notification_service.h"
|
| @@ -700,6 +702,15 @@ void ScreenLocker::OnLoginSuccess(
|
| UMA_HISTOGRAM_TIMES("ScreenLocker.AuthenticationSuccessTime", delta);
|
| }
|
|
|
| + Profile* profile = ProfileManager::GetDefaultProfile();
|
| + if (profile) {
|
| + ProfileSyncService* service = profile->GetProfileSyncService(username);
|
| + if (service && !service->HasSyncSetupCompleted()) {
|
| + // If sync has failed somehow, try setting the sync passphrase here.
|
| + service->SetPassphrase(password, false);
|
| + }
|
| + }
|
| +
|
| if (CrosLibrary::Get()->EnsureLoaded())
|
| CrosLibrary::Get()->GetScreenLockLibrary()->NotifyScreenUnlockRequested();
|
| }
|
|
|