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

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

Issue 6312154: Remove wstring from RVH's run Javascript command.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 11 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
Index: chrome/browser/ui/login/login_prompt.cc
===================================================================
--- chrome/browser/ui/login/login_prompt.cc (revision 73855)
+++ chrome/browser/ui/login/login_prompt.cc (working copy)
@@ -124,8 +124,8 @@
return rvh->delegate();
}
-void LoginHandler::SetAuth(const std::wstring& username,
- const std::wstring& password) {
+void LoginHandler::SetAuth(const string16& username,
+ const string16& password) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
if (TestAndSetAuthHandled())
@@ -133,8 +133,8 @@
// Tell the password manager the credentials were submitted / accepted.
if (password_manager_) {
- password_form_.username_value = WideToUTF16Hack(username);
- password_form_.password_value = WideToUTF16Hack(password);
+ password_form_.username_value = username;
+ password_form_.password_value = password;
password_manager_->ProvisionallySavePassword(password_form_);
}
@@ -293,8 +293,8 @@
Details<LoginNotificationDetails>(&details));
}
-void LoginHandler::NotifyAuthSupplied(const std::wstring& username,
- const std::wstring& password) {
+void LoginHandler::NotifyAuthSupplied(const string16& username,
+ const string16& password) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
DCHECK(WasAuthHandled());
@@ -345,12 +345,12 @@
}
// Calls SetAuth from the IO loop.
-void LoginHandler::SetAuthDeferred(const std::wstring& username,
- const std::wstring& password) {
+void LoginHandler::SetAuthDeferred(const string16& username,
+ const string16& password) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
if (request_) {
- request_->SetAuth(WideToUTF16Hack(username), WideToUTF16Hack(password));
+ request_->SetAuth(username, password);
ResetLoginHandlerForRequest(request_);
}
}
@@ -421,8 +421,7 @@
l10n_util::GetStringFUTF16(IDS_LOGIN_DIALOG_DESCRIPTION,
host_and_port_hack16,
realm_hack16);
- handler_->BuildViewForPasswordManager(password_manager,
- UTF16ToWideHack(explanation));
+ handler_->BuildViewForPasswordManager(password_manager, explanation);
}
private:

Powered by Google App Engine
This is Rietveld 408576698