Chromium Code Reviews| Index: chrome/browser/ui/login/login_prompt_ui.cc |
| diff --git a/chrome/browser/ui/login/login_prompt_ui.cc b/chrome/browser/ui/login/login_prompt_ui.cc |
| index c072d21bb80c3e0474324ba4140473f744b903e2..6387a102ce02934b581355a9f9256d244ba98ee8 100644 |
| --- a/chrome/browser/ui/login/login_prompt_ui.cc |
| +++ b/chrome/browser/ui/login/login_prompt_ui.cc |
| @@ -9,6 +9,7 @@ |
| #include "base/bind.h" |
| #include "base/bind_helpers.h" |
| #include "base/json/json_reader.h" |
| +#include "base/string16.h" |
| #include "base/utf_string_conversions.h" |
| #include "base/values.h" |
| #include "chrome/browser/profiles/profile.h" |
| @@ -127,8 +128,8 @@ class LoginHandlerHtmlDelegate : public HtmlDialogUIDelegate, |
| base::Unretained(this))); |
| } |
| - void ShowAutofillData(const std::wstring& username, |
| - const std::wstring& password); |
| + void ShowAutofillData(const string16& username, |
| + const string16& password); |
| private: |
| // Send autofill data to HTML once the dialog is ready and the data is |
| @@ -164,8 +165,8 @@ class LoginHandlerHtml : public LoginHandler { |
| } |
| // LoginModelObserver method: |
| - virtual void OnAutofillDataAvailable(const std::wstring& username, |
| - const std::wstring& password) OVERRIDE { |
| + virtual void OnAutofillDataAvailable(const string16& username, |
| + const string16& password) OVERRIDE { |
| if (delegate_) |
| delegate_->ShowAutofillData(username, password); |
| } |
| @@ -218,10 +219,10 @@ void LoginHandlerHtmlDelegate::OnDialogClosed(const std::string& json_retval) { |
| // we've registered ourselves as a WebUIMessageHandler. |
| } |
| -void LoginHandlerHtmlDelegate::ShowAutofillData(const std::wstring& username, |
| - const std::wstring& password) { |
| - autofill_username_ = WideToUTF8(username); |
| - autofill_password_ = WideToUTF8(password); |
| +void LoginHandlerHtmlDelegate::ShowAutofillData(const string16& username, |
| + const string16& password) { |
| + autofill_username_ = UTF16ToUTF8(username); |
|
Elliot Glaysher
2011/10/31 19:08:27
Looking at this final consumer, should all of this
(unused - use chromium)
2011/10/31 19:15:09
No, we don't want to pass text around in utf8 for
Elliot Glaysher
2011/10/31 19:18:29
ok lgtm then.
tony
2011/10/31 19:51:15
I ended up changing autofill_username_ and autofil
|
| + autofill_password_ = UTF16ToUTF8(password); |
| has_autofill_ = true; |
| SendAutofillData(); |
| } |