| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 <gdk/gdkx.h> | 7 #include <gdk/gdkx.h> |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 #include <X11/extensions/XTest.h> | 10 #include <X11/extensions/XTest.h> |
| (...skipping 774 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 785 base::TimeDelta delta = base::Time::Now() - authentication_start_time_; | 785 base::TimeDelta delta = base::Time::Now() - authentication_start_time_; |
| 786 VLOG(1) << "Authentication success time: " << delta.InSecondsF(); | 786 VLOG(1) << "Authentication success time: " << delta.InSecondsF(); |
| 787 UMA_HISTOGRAM_TIMES("ScreenLocker.AuthenticationSuccessTime", delta); | 787 UMA_HISTOGRAM_TIMES("ScreenLocker.AuthenticationSuccessTime", delta); |
| 788 } | 788 } |
| 789 | 789 |
| 790 Profile* profile = ProfileManager::GetDefaultProfile(); | 790 Profile* profile = ProfileManager::GetDefaultProfile(); |
| 791 if (profile) { | 791 if (profile) { |
| 792 ProfileSyncService* service = profile->GetProfileSyncService(username); | 792 ProfileSyncService* service = profile->GetProfileSyncService(username); |
| 793 if (service && !service->HasSyncSetupCompleted()) { | 793 if (service && !service->HasSyncSetupCompleted()) { |
| 794 // If sync has failed somehow, try setting the sync passphrase here. | 794 // If sync has failed somehow, try setting the sync passphrase here. |
| 795 service->SetPassphrase(password, false); | 795 service->SetPassphrase(password, false, true); |
| 796 } | 796 } |
| 797 } | 797 } |
| 798 | 798 |
| 799 if (CrosLibrary::Get()->EnsureLoaded()) | 799 if (CrosLibrary::Get()->EnsureLoaded()) |
| 800 CrosLibrary::Get()->GetScreenLockLibrary()->NotifyScreenUnlockRequested(); | 800 CrosLibrary::Get()->GetScreenLockLibrary()->NotifyScreenUnlockRequested(); |
| 801 } | 801 } |
| 802 | 802 |
| 803 void ScreenLocker::InfoBubbleClosing(InfoBubble* info_bubble, | 803 void ScreenLocker::InfoBubbleClosing(InfoBubble* info_bubble, |
| 804 bool closed_by_escape) { | 804 bool closed_by_escape) { |
| 805 error_info_ = NULL; | 805 error_info_ = NULL; |
| (...skipping 311 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1117 | 1117 |
| 1118 bool ScreenLocker::AcceleratorPressed(const views::Accelerator& accelerator) { | 1118 bool ScreenLocker::AcceleratorPressed(const views::Accelerator& accelerator) { |
| 1119 if (!background_view_->IsScreenSaverVisible()) { | 1119 if (!background_view_->IsScreenSaverVisible()) { |
| 1120 StartScreenSaver(); | 1120 StartScreenSaver(); |
| 1121 return true; | 1121 return true; |
| 1122 } | 1122 } |
| 1123 return false; | 1123 return false; |
| 1124 } | 1124 } |
| 1125 | 1125 |
| 1126 } // namespace chromeos | 1126 } // namespace chromeos |
| OLD | NEW |