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

Unified Diff: net/socket_stream/socket_stream_unittest.cc

Issue 3040016: Net: Convert username and password to string16. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: address comments Created 10 years, 5 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 | « net/socket_stream/socket_stream_job.h ('k') | net/spdy/spdy_network_transaction.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/socket_stream/socket_stream_unittest.cc
===================================================================
--- net/socket_stream/socket_stream_unittest.cc (revision 53997)
+++ net/socket_stream/socket_stream_unittest.cc (working copy)
@@ -1,4 +1,4 @@
-// Copyright (c) 2009 The Chromium Authors. All rights reserved.
+// Copyright (c) 2010 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -119,8 +119,8 @@
<< " password=" << password_;
event->socket->RestartWithAuth(username_, password_);
}
- void SetAuthInfo(const std::wstring& username,
- const std::wstring& password) {
+ void SetAuthInfo(const string16& username,
+ const string16& password) {
username_ = username;
password_ = password;
}
@@ -138,8 +138,8 @@
Callback1<SocketStreamEvent*>::Type* on_auth_required_;
net::CompletionCallback* callback_;
- std::wstring username_;
- std::wstring password_;
+ string16 username_;
+ string16 password_;
DISALLOW_COPY_AND_ASSIGN(SocketStreamEventRecorder);
};
@@ -318,9 +318,7 @@
new SocketStreamEventRecorder(&callback));
delegate->SetOnConnected(NewCallback(delegate.get(),
&SocketStreamEventRecorder::DoClose));
- const std::wstring kUsername = L"foo";
- const std::wstring kPassword = L"bar";
- delegate->SetAuthInfo(kUsername, kPassword);
+ delegate->SetAuthInfo(ASCIIToUTF16("foo"), ASCIIToUTF16("bar"));
delegate->SetOnAuthRequired(
NewCallback(delegate.get(),
&SocketStreamEventRecorder::DoRestartWithAuth));
« no previous file with comments | « net/socket_stream/socket_stream_job.h ('k') | net/spdy/spdy_network_transaction.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698