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

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

Issue 8413022: wstring cleanup in browser/ui/login (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: better 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_browsertest.cc ('k') | chrome/browser/ui/login/login_prompt_mac.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/login/login_prompt_gtk.cc
diff --git a/chrome/browser/ui/login/login_prompt_gtk.cc b/chrome/browser/ui/login/login_prompt_gtk.cc
index 794ddaac115b547e12a7c305b463d7b38f17997c..744c31add2b67b95a9851c0cc59acd05c2c9c67e 100644
--- a/chrome/browser/ui/login/login_prompt_gtk.cc
+++ b/chrome/browser/ui/login/login_prompt_gtk.cc
@@ -6,6 +6,7 @@
#include <gtk/gtk.h>
+#include "base/string16.h"
#include "base/utf_string_conversions.h"
#include "chrome/browser/password_manager/password_manager.h"
#include "chrome/browser/tab_contents/tab_contents_view_gtk.h"
@@ -49,17 +50,17 @@ class LoginHandlerGtk : public LoginHandler,
}
// LoginModelObserver implementation.
- virtual void OnAutofillDataAvailable(const std::wstring& username,
- const std::wstring& password) {
+ virtual void OnAutofillDataAvailable(const string16& username,
+ const string16& password) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
// NOTE: Would be nice to use gtk_entry_get_text_length, but it is fairly
// new and not always in our GTK version.
if (strlen(gtk_entry_get_text(GTK_ENTRY(username_entry_))) == 0) {
gtk_entry_set_text(GTK_ENTRY(username_entry_),
- WideToUTF8(username).c_str());
+ UTF16ToUTF8(username).c_str());
gtk_entry_set_text(GTK_ENTRY(password_entry_),
- WideToUTF8(password).c_str());
+ UTF16ToUTF8(password).c_str());
gtk_editable_select_region(GTK_EDITABLE(username_entry_), 0, -1);
}
}
« no previous file with comments | « chrome/browser/ui/login/login_prompt_browsertest.cc ('k') | chrome/browser/ui/login/login_prompt_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698