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

Unified Diff: chrome/browser/ui/login/login_prompt_ui.cc

Issue 8413022: wstring cleanup in browser/ui/login (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 2 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 | « chrome/browser/ui/login/login_prompt_mac.mm ('k') | chrome/browser/ui/login/login_prompt_uitest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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();
}
« no previous file with comments | « chrome/browser/ui/login/login_prompt_mac.mm ('k') | chrome/browser/ui/login/login_prompt_uitest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698