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 741 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
752 } else { | 752 } else { |
753 base::TimeDelta delta = base::Time::Now() - authentication_start_time_; | 753 base::TimeDelta delta = base::Time::Now() - authentication_start_time_; |
754 VLOG(1) << "Authentication failure time: " << delta.InSecondsF(); | 754 VLOG(1) << "Authentication failure time: " << delta.InSecondsF(); |
755 UMA_HISTOGRAM_TIMES("ScreenLocker.AuthenticationFailureTime", delta); | 755 UMA_HISTOGRAM_TIMES("ScreenLocker.AuthenticationFailureTime", delta); |
756 } | 756 } |
757 | 757 |
758 EnableInput(); | 758 EnableInput(); |
759 // Don't enable signout button here as we're showing | 759 // Don't enable signout button here as we're showing |
760 // MessageBubble. | 760 // MessageBubble. |
761 | 761 |
762 std::wstring msg = l10n_util::GetString(IDS_LOGIN_ERROR_AUTHENTICATING); | 762 string16 msg = l10n_util::GetStringUTF16(IDS_LOGIN_ERROR_AUTHENTICATING); |
763 const std::string error_text = error.GetErrorString(); | 763 const std::string error_text = error.GetErrorString(); |
764 if (!error_text.empty()) | 764 if (!error_text.empty()) |
765 msg += L"\n" + ASCIIToWide(error_text); | 765 msg += ASCIIToUTF16("\n") + ASCIIToUTF16(error_text); |
766 | 766 |
767 InputMethodLibrary* input_method_library = | 767 InputMethodLibrary* input_method_library = |
768 CrosLibrary::Get()->GetInputMethodLibrary(); | 768 CrosLibrary::Get()->GetInputMethodLibrary(); |
769 if (input_method_library->GetNumActiveInputMethods() > 1) | 769 if (input_method_library->GetNumActiveInputMethods() > 1) |
770 msg += L"\n" + l10n_util::GetString(IDS_LOGIN_ERROR_KEYBOARD_SWITCH_HINT); | 770 msg += ASCIIToUTF16("\n") + |
| 771 l10n_util::GetStringUTF16(IDS_LOGIN_ERROR_KEYBOARD_SWITCH_HINT); |
771 | 772 |
772 ShowErrorBubble(msg, BubbleBorder::BOTTOM_LEFT); | 773 ShowErrorBubble(UTF16ToWide(msg), BubbleBorder::BOTTOM_LEFT); |
773 } | 774 } |
774 | 775 |
775 void ScreenLocker::OnLoginSuccess( | 776 void ScreenLocker::OnLoginSuccess( |
776 const std::string& username, | 777 const std::string& username, |
777 const std::string& password, | 778 const std::string& password, |
778 const GaiaAuthConsumer::ClientLoginResult& unused, | 779 const GaiaAuthConsumer::ClientLoginResult& unused, |
779 bool pending_requests) { | 780 bool pending_requests) { |
780 VLOG(1) << "OnLoginSuccess: Sending Unlock request."; | 781 VLOG(1) << "OnLoginSuccess: Sending Unlock request."; |
781 if (authentication_start_time_.is_null()) { | 782 if (authentication_start_time_.is_null()) { |
782 LOG(ERROR) << "authentication_start_time_ is not set"; | 783 LOG(ERROR) << "authentication_start_time_ is not set"; |
(...skipping 333 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1116 | 1117 |
1117 bool ScreenLocker::AcceleratorPressed(const views::Accelerator& accelerator) { | 1118 bool ScreenLocker::AcceleratorPressed(const views::Accelerator& accelerator) { |
1118 if (!background_view_->IsScreenSaverVisible()) { | 1119 if (!background_view_->IsScreenSaverVisible()) { |
1119 StartScreenSaver(); | 1120 StartScreenSaver(); |
1120 return true; | 1121 return true; |
1121 } | 1122 } |
1122 return false; | 1123 return false; |
1123 } | 1124 } |
1124 | 1125 |
1125 } // namespace chromeos | 1126 } // namespace chromeos |
OLD | NEW |