diff options
author | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-03-29 19:58:57 +0000 |
---|---|---|
committer | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-03-29 19:58:57 +0000 |
commit | 42cba2fb14b47a0c9463763b7c8c83f36d2fcef5 (patch) | |
tree | ef873bab10a838d28cc81c0e927f156ee6b55b5e /net/http | |
parent | b82d265634ced5b6457dac631868e7270963fa7e (diff) | |
download | chromium_src-42cba2fb14b47a0c9463763b7c8c83f36d2fcef5.zip chromium_src-42cba2fb14b47a0c9463763b7c8c83f36d2fcef5.tar.gz chromium_src-42cba2fb14b47a0c9463763b7c8c83f36d2fcef5.tar.bz2 |
Convert net to use base::string16 instead of string16.
This is just a search-and-replace.
BUG=
Review URL: https://codereview.chromium.org/13329004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@191432 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/http')
-rw-r--r-- | net/http/http_auth_cache_unittest.cc | 18 | ||||
-rw-r--r-- | net/http/http_auth_controller.cc | 4 | ||||
-rw-r--r-- | net/http/http_auth_controller_unittest.cc | 3 | ||||
-rw-r--r-- | net/http/http_auth_filter.cc | 2 | ||||
-rw-r--r-- | net/http/http_auth_handler_ntlm.cc | 8 | ||||
-rw-r--r-- | net/http/http_auth_handler_ntlm.h | 2 | ||||
-rw-r--r-- | net/http/http_auth_handler_ntlm_portable.cc | 14 | ||||
-rw-r--r-- | net/http/http_auth_sspi_win.cc | 18 | ||||
-rw-r--r-- | net/http/http_auth_sspi_win.h | 6 | ||||
-rw-r--r-- | net/http/http_content_disposition.cc | 2 | ||||
-rw-r--r-- | net/http/http_network_transaction_spdy2_unittest.cc | 24 | ||||
-rw-r--r-- | net/http/http_network_transaction_spdy3_unittest.cc | 24 | ||||
-rw-r--r-- | net/http/http_proxy_client_socket_pool_spdy2_unittest.cc | 4 | ||||
-rw-r--r-- | net/http/http_proxy_client_socket_pool_spdy3_unittest.cc | 4 |
14 files changed, 67 insertions, 66 deletions
diff --git a/net/http/http_auth_cache_unittest.cc b/net/http/http_auth_cache_unittest.cc index 286d44a..af3b25c 100644 --- a/net/http/http_auth_cache_unittest.cc +++ b/net/http/http_auth_cache_unittest.cc @@ -58,15 +58,15 @@ const char* kRealm2 = "Realm2"; const char* kRealm3 = "Realm3"; const char* kRealm4 = "Realm4"; const char* kRealm5 = "Realm5"; -const string16 k123(ASCIIToUTF16("123")); -const string16 k1234(ASCIIToUTF16("1234")); -const string16 kAdmin(ASCIIToUTF16("admin")); -const string16 kAlice(ASCIIToUTF16("alice")); -const string16 kAlice2(ASCIIToUTF16("alice2")); -const string16 kPassword(ASCIIToUTF16("password")); -const string16 kRoot(ASCIIToUTF16("root")); -const string16 kUsername(ASCIIToUTF16("username")); -const string16 kWileCoyote(ASCIIToUTF16("wilecoyote")); +const base::string16 k123(ASCIIToUTF16("123")); +const base::string16 k1234(ASCIIToUTF16("1234")); +const base::string16 kAdmin(ASCIIToUTF16("admin")); +const base::string16 kAlice(ASCIIToUTF16("alice")); +const base::string16 kAlice2(ASCIIToUTF16("alice2")); +const base::string16 kPassword(ASCIIToUTF16("password")); +const base::string16 kRoot(ASCIIToUTF16("root")); +const base::string16 kUsername(ASCIIToUTF16("username")); +const base::string16 kWileCoyote(ASCIIToUTF16("wilecoyote")); AuthCredentials CreateASCIICredentials(const char* username, const char* password) { diff --git a/net/http/http_auth_controller.cc b/net/http/http_auth_controller.cc index 0dcb5bb..ae39640 100644 --- a/net/http/http_auth_controller.cc +++ b/net/http/http_auth_controller.cc @@ -456,8 +456,8 @@ bool HttpAuthController::SelectNextAuthIdentityToTry() { identity_.source = HttpAuth::IDENT_SRC_URL; identity_.invalid = false; // Extract the username:password from the URL. - string16 username; - string16 password; + base::string16 username; + base::string16 password; GetIdentityFromURL(auth_url_, &username, &password); identity_.credentials.Set(username, password); embedded_identity_used_ = true; diff --git a/net/http/http_auth_controller_unittest.cc b/net/http/http_auth_controller_unittest.cc index a50d767..dd9c0c2 100644 --- a/net/http/http_auth_controller_unittest.cc +++ b/net/http/http_auth_controller_unittest.cc @@ -224,7 +224,8 @@ TEST(HttpAuthControllerTest, NoExplicitCredentialsAllowed) { ASSERT_EQ(OK, controller->HandleAuthChallenge(headers, false, false, dummy_log)); ASSERT_TRUE(controller->HaveAuthHandler()); - controller->ResetAuth(AuthCredentials(ASCIIToUTF16("Hello"), string16())); + controller->ResetAuth(AuthCredentials(ASCIIToUTF16("Hello"), + base::string16())); EXPECT_TRUE(controller->HaveAuth()); EXPECT_TRUE(controller->IsAuthSchemeDisabled(HttpAuth::AUTH_SCHEME_MOCK)); EXPECT_FALSE(controller->IsAuthSchemeDisabled(HttpAuth::AUTH_SCHEME_BASIC)); diff --git a/net/http/http_auth_filter.cc b/net/http/http_auth_filter.cc index 2109e4d..78e662e 100644 --- a/net/http/http_auth_filter.cc +++ b/net/http/http_auth_filter.cc @@ -9,7 +9,7 @@ namespace net { // Using a std::set<> has the benefit of removing duplicates automatically. -typedef std::set<string16> RegistryWhitelist; +typedef std::set<base::string16> RegistryWhitelist; // TODO(ahendrickson) -- Determine if we want separate whitelists for HTTP and // HTTPS, one for both, or only an HTTP one. My understanding is that the HTTPS diff --git a/net/http/http_auth_handler_ntlm.cc b/net/http/http_auth_handler_ntlm.cc index 964ae27..d404ce2 100644 --- a/net/http/http_auth_handler_ntlm.cc +++ b/net/http/http_auth_handler_ntlm.cc @@ -52,12 +52,12 @@ int HttpAuthHandlerNTLM::GenerateAuthTokenImpl( // The username may be in the form "DOMAIN\user". Parse it into the two // components. - string16 domain; - string16 user; - const string16& username = credentials->username(); + base::string16 domain; + base::string16 user; + const base::string16& username = credentials->username(); const char16 backslash_character = '\\'; size_t backslash_idx = username.find(backslash_character); - if (backslash_idx == string16::npos) { + if (backslash_idx == base::string16::npos) { user = username; } else { domain = username.substr(0, backslash_idx); diff --git a/net/http/http_auth_handler_ntlm.h b/net/http/http_auth_handler_ntlm.h index be60ae8..71534b9 100644 --- a/net/http/http_auth_handler_ntlm.h +++ b/net/http/http_auth_handler_ntlm.h @@ -156,7 +156,7 @@ class NET_EXPORT_PRIVATE HttpAuthHandlerNTLM : public HttpAuthHandler { static HostNameProc get_host_name_proc_; #endif - string16 domain_; + base::string16 domain_; AuthCredentials credentials_; // The base64-encoded string following "NTLM" in the "WWW-Authenticate" or diff --git a/net/http/http_auth_handler_ntlm_portable.cc b/net/http/http_auth_handler_ntlm_portable.cc index de7ed86..491a299a6 100644 --- a/net/http/http_auth_handler_ntlm_portable.cc +++ b/net/http/http_auth_handler_ntlm_portable.cc @@ -252,7 +252,7 @@ static uint32 ReadUint32(const uint8*& buf) { // // Note: This function is not being used because our SendLM() function always // returns false. -static void LM_Hash(const string16& password, uint8* hash) { +static void LM_Hash(const base::string16& password, uint8* hash) { static const uint8 LM_MAGIC[] = "KGS!@#$%"; // Convert password to OEM character set. We'll just use the native @@ -277,7 +277,7 @@ static void LM_Hash(const string16& password, uint8* hash) { // null-terminated unicode password. // param hash // 16-byte result buffer -static void NTLM_Hash(const string16& password, uint8* hash) { +static void NTLM_Hash(const base::string16& password, uint8* hash) { #ifdef IS_BIG_ENDIAN uint32 len = password.length(); uint8* passbuf; @@ -438,9 +438,9 @@ static void GenerateRandom(uint8* output, size_t n) { } // Returns OK or a network error code. -static int GenerateType3Msg(const string16& domain, - const string16& username, - const string16& password, +static int GenerateType3Msg(const base::string16& domain, + const base::string16& username, + const base::string16& password, const std::string& hostname, const void* rand_8_bytes, const void* in_buf, @@ -460,9 +460,9 @@ static int GenerateType3Msg(const string16& domain, // Temporary buffers for unicode strings #ifdef IS_BIG_ENDIAN - string16 ucs_domain_buf, ucs_user_buf; + base::string16 ucs_domain_buf, ucs_user_buf; #endif - string16 ucs_host_buf; + base::string16 ucs_host_buf; // Temporary buffers for oem strings std::string oem_domain_buf, oem_user_buf; // Pointers and lengths for the string buffers; encoding is unicode if diff --git a/net/http/http_auth_sspi_win.cc b/net/http/http_auth_sspi_win.cc index f4cbe9d..f3341e7 100644 --- a/net/http/http_auth_sspi_win.cc +++ b/net/http/http_auth_sspi_win.cc @@ -48,9 +48,9 @@ int MapAcquireCredentialsStatusToError(SECURITY_STATUS status, int AcquireExplicitCredentials(SSPILibrary* library, const SEC_WCHAR* package, - const string16& domain, - const string16& user, - const string16& password, + const base::string16& domain, + const base::string16& user, + const base::string16& password, CredHandle* cred) { SEC_WINNT_AUTH_IDENTITY identity; identity.Flags = SEC_WINNT_AUTH_IDENTITY_UNICODE; @@ -295,8 +295,8 @@ int HttpAuthSSPI::OnFirstRound(const AuthCredentials* credentials) { DCHECK(!SecIsValidHandle(&cred_)); int rv = OK; if (credentials) { - string16 domain; - string16 user; + base::string16 domain; + base::string16 user; SplitDomainAndUser(credentials->username(), &domain, &user); rv = AcquireExplicitCredentials(library_, security_package_, domain, user, credentials->password(), &cred_); @@ -390,14 +390,14 @@ int HttpAuthSSPI::GetNextSecurityToken( return OK; } -void SplitDomainAndUser(const string16& combined, - string16* domain, - string16* user) { +void SplitDomainAndUser(const base::string16& combined, + base::string16* domain, + base::string16* user) { // |combined| may be in the form "user" or "DOMAIN\user". // Separate the two parts if they exist. // TODO(cbentzel): I believe user@domain is also a valid form. size_t backslash_idx = combined.find(L'\\'); - if (backslash_idx == string16::npos) { + if (backslash_idx == base::string16::npos) { domain->clear(); *user = combined; } else { diff --git a/net/http/http_auth_sspi_win.h b/net/http/http_auth_sspi_win.h index a4fbedc..372f4bd 100644 --- a/net/http/http_auth_sspi_win.h +++ b/net/http/http_auth_sspi_win.h @@ -180,9 +180,9 @@ class NET_EXPORT_PRIVATE HttpAuthSSPI { // If |combined| is of form "bar", |domain| will be empty and |user| will // contain "bar". // |domain| and |user| must be non-NULL. -NET_EXPORT_PRIVATE void SplitDomainAndUser(const string16& combined, - string16* domain, - string16* user); +NET_EXPORT_PRIVATE void SplitDomainAndUser(const base::string16& combined, + base::string16* domain, + base::string16* user); // Determines the maximum token length in bytes for a particular SSPI package. // diff --git a/net/http/http_content_disposition.cc b/net/http/http_content_disposition.cc index 37335c0..b280bc1 100644 --- a/net/http/http_content_disposition.cc +++ b/net/http/http_content_disposition.cc @@ -108,7 +108,7 @@ bool DecodeWord(const std::string& encoded_word, if (IsStringUTF8(encoded_word)) { *output = encoded_word; } else { - string16 utf16_output; + base::string16 utf16_output; if (!referrer_charset.empty() && base::CodepageToUTF16(encoded_word, referrer_charset.c_str(), base::OnStringConversionError::FAIL, diff --git a/net/http/http_network_transaction_spdy2_unittest.cc b/net/http/http_network_transaction_spdy2_unittest.cc index e773011..ea45e12 100644 --- a/net/http/http_network_transaction_spdy2_unittest.cc +++ b/net/http/http_network_transaction_spdy2_unittest.cc @@ -69,18 +69,18 @@ using namespace net::test_spdy2; namespace { -const string16 kBar(ASCIIToUTF16("bar")); -const string16 kBar2(ASCIIToUTF16("bar2")); -const string16 kBar3(ASCIIToUTF16("bar3")); -const string16 kBaz(ASCIIToUTF16("baz")); -const string16 kFirst(ASCIIToUTF16("first")); -const string16 kFoo(ASCIIToUTF16("foo")); -const string16 kFoo2(ASCIIToUTF16("foo2")); -const string16 kFoo3(ASCIIToUTF16("foo3")); -const string16 kFou(ASCIIToUTF16("fou")); -const string16 kSecond(ASCIIToUTF16("second")); -const string16 kTestingNTLM(ASCIIToUTF16("testing-ntlm")); -const string16 kWrongPassword(ASCIIToUTF16("wrongpassword")); +const base::string16 kBar(ASCIIToUTF16("bar")); +const base::string16 kBar2(ASCIIToUTF16("bar2")); +const base::string16 kBar3(ASCIIToUTF16("bar3")); +const base::string16 kBaz(ASCIIToUTF16("baz")); +const base::string16 kFirst(ASCIIToUTF16("first")); +const base::string16 kFoo(ASCIIToUTF16("foo")); +const base::string16 kFoo2(ASCIIToUTF16("foo2")); +const base::string16 kFoo3(ASCIIToUTF16("foo3")); +const base::string16 kFou(ASCIIToUTF16("fou")); +const base::string16 kSecond(ASCIIToUTF16("second")); +const base::string16 kTestingNTLM(ASCIIToUTF16("testing-ntlm")); +const base::string16 kWrongPassword(ASCIIToUTF16("wrongpassword")); // MakeNextProtos is a utility function that returns a vector of std::strings // from its arguments. Don't forget to terminate the argument list with a NULL. diff --git a/net/http/http_network_transaction_spdy3_unittest.cc b/net/http/http_network_transaction_spdy3_unittest.cc index 8bc44db..095cfc5 100644 --- a/net/http/http_network_transaction_spdy3_unittest.cc +++ b/net/http/http_network_transaction_spdy3_unittest.cc @@ -69,18 +69,18 @@ using namespace net::test_spdy3; namespace { -const string16 kBar(ASCIIToUTF16("bar")); -const string16 kBar2(ASCIIToUTF16("bar2")); -const string16 kBar3(ASCIIToUTF16("bar3")); -const string16 kBaz(ASCIIToUTF16("baz")); -const string16 kFirst(ASCIIToUTF16("first")); -const string16 kFoo(ASCIIToUTF16("foo")); -const string16 kFoo2(ASCIIToUTF16("foo2")); -const string16 kFoo3(ASCIIToUTF16("foo3")); -const string16 kFou(ASCIIToUTF16("fou")); -const string16 kSecond(ASCIIToUTF16("second")); -const string16 kTestingNTLM(ASCIIToUTF16("testing-ntlm")); -const string16 kWrongPassword(ASCIIToUTF16("wrongpassword")); +const base::string16 kBar(ASCIIToUTF16("bar")); +const base::string16 kBar2(ASCIIToUTF16("bar2")); +const base::string16 kBar3(ASCIIToUTF16("bar3")); +const base::string16 kBaz(ASCIIToUTF16("baz")); +const base::string16 kFirst(ASCIIToUTF16("first")); +const base::string16 kFoo(ASCIIToUTF16("foo")); +const base::string16 kFoo2(ASCIIToUTF16("foo2")); +const base::string16 kFoo3(ASCIIToUTF16("foo3")); +const base::string16 kFou(ASCIIToUTF16("fou")); +const base::string16 kSecond(ASCIIToUTF16("second")); +const base::string16 kTestingNTLM(ASCIIToUTF16("testing-ntlm")); +const base::string16 kWrongPassword(ASCIIToUTF16("wrongpassword")); // MakeNextProtos is a utility function that returns a vector of std::strings // from its arguments. Don't forget to terminate the argument list with a NULL. diff --git a/net/http/http_proxy_client_socket_pool_spdy2_unittest.cc b/net/http/http_proxy_client_socket_pool_spdy2_unittest.cc index 53fa1f7..77ccbed 100644 --- a/net/http/http_proxy_client_socket_pool_spdy2_unittest.cc +++ b/net/http/http_proxy_client_socket_pool_spdy2_unittest.cc @@ -89,8 +89,8 @@ class HttpProxyClientSocketPoolSpdy2Test : public TestWithHttpParam { } void AddAuthToCache() { - const string16 kFoo(ASCIIToUTF16("foo")); - const string16 kBar(ASCIIToUTF16("bar")); + const base::string16 kFoo(ASCIIToUTF16("foo")); + const base::string16 kBar(ASCIIToUTF16("bar")); GURL proxy_url(GetParam() == HTTP ? "http://proxy" : "https://proxy:80"); session_->http_auth_cache()->Add(proxy_url, "MyRealm1", diff --git a/net/http/http_proxy_client_socket_pool_spdy3_unittest.cc b/net/http/http_proxy_client_socket_pool_spdy3_unittest.cc index b7f64b3..86924fc 100644 --- a/net/http/http_proxy_client_socket_pool_spdy3_unittest.cc +++ b/net/http/http_proxy_client_socket_pool_spdy3_unittest.cc @@ -89,8 +89,8 @@ class HttpProxyClientSocketPoolSpdy3Test : public TestWithHttpParam { } void AddAuthToCache() { - const string16 kFoo(ASCIIToUTF16("foo")); - const string16 kBar(ASCIIToUTF16("bar")); + const base::string16 kFoo(ASCIIToUTF16("foo")); + const base::string16 kBar(ASCIIToUTF16("bar")); GURL proxy_url(GetParam() == HTTP ? "http://proxy" : "https://proxy:80"); session_->http_auth_cache()->Add(proxy_url, "MyRealm1", |