Net: Convert username and password to string16.

BUG=none
TEST=none
Review URL: http://codereview.chromium.org/3040016

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@54101 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/net/url_request/url_request_unittest.cc b/net/url_request/url_request_unittest.cc
index 8c842fe..bfbd290 100644
--- a/net/url_request/url_request_unittest.cc
+++ b/net/url_request/url_request_unittest.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2006-2010 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.
 
@@ -51,6 +51,10 @@
 
 namespace {
 
+const string16 kChrome(ASCIIToUTF16("chrome"));
+const string16 kSecret(ASCIIToUTF16("secret"));
+const string16 kUser(ASCIIToUTF16("user"));
+
 base::StringPiece TestNetResourceProvider(int key) {
   return "header";
 }
@@ -1165,8 +1169,8 @@
   // populate the cache
   {
     TestDelegate d;
-    d.set_username(L"user");
-    d.set_password(L"secret");
+    d.set_username(kUser);
+    d.set_password(kSecret);
 
     URLRequest r(server_->TestServerPage("auth-basic"), &d);
     r.set_context(context);
@@ -1182,8 +1186,8 @@
   // response should be fetched from the cache.
   {
     TestDelegate d;
-    d.set_username(L"user");
-    d.set_password(L"secret");
+    d.set_username(kUser);
+    d.set_password(kSecret);
 
     URLRequest r(server_->TestServerPage("auth-basic"), &d);
     r.set_context(context);
@@ -1212,8 +1216,8 @@
   {
     scoped_refptr<URLRequestContext> context = new TestURLRequestContext();
     TestDelegate d;
-    d.set_username(L"user");
-    d.set_password(L"secret");
+    d.set_username(kUser);
+    d.set_password(kSecret);
 
     URLRequest r(url_requiring_auth, &d);
     r.set_context(context);
@@ -1771,7 +1775,7 @@
     this->NotifyRestartRequired();
   }
  private:
-   ~RestartTestJob() {}
+  ~RestartTestJob() {}
 };
 
 class CancelTestJob : public URLRequestTestJob {
@@ -2335,8 +2339,8 @@
   TestDelegate d;
   // Set correct login credentials. The delegate will be asked for them when
   // the initial login with wrong credentials will fail.
-  d.set_username(L"chrome");
-  d.set_password(L"chrome");
+  d.set_username(kChrome);
+  d.set_password(kChrome);
   {
     TestURLRequest r(server_->TestServerPage("/LICENSE",
                                              "chrome", "wrong_password"), &d);
@@ -2388,8 +2392,8 @@
   TestDelegate d;
   // Set correct login credentials. The delegate will be asked for them when
   // the initial login with wrong credentials will fail.
-  d.set_username(L"chrome");
-  d.set_password(L"chrome");
+  d.set_username(kChrome);
+  d.set_password(kChrome);
   {
     TestURLRequest r(server_->TestServerPage("/LICENSE",
                                              "wrong_user", "chrome"), &d);
@@ -2464,8 +2468,8 @@
   scoped_ptr<TestDelegate> d(new TestDelegate);
   // Set correct login credentials. The delegate will be asked for them when
   // the initial login with wrong credentials will fail.
-  d->set_username(L"chrome");
-  d->set_password(L"chrome");
+  d->set_username(kChrome);
+  d->set_password(kChrome);
   {
     TestURLRequest r(server_->TestServerPage("/LICENSE",
                                              "chrome", "wrong_password"),