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

Unified Diff: net/base/net_util.h

Issue 6898026: Eliminate wstring from base/utf_offset_string_conversions.h, net/base/escape.h, and net/base/net_... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 8 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: net/base/net_util.h
===================================================================
--- net/base/net_util.h (revision 82762)
+++ net/base/net_util.h (working copy)
@@ -135,18 +135,13 @@
// Return the value of the HTTP response header with name 'name'. 'headers'
// should be in the format that URLRequest::GetResponseHeaders() returns.
// Returns the empty string if the header is not found.
-std::wstring GetSpecificHeader(const std::wstring& headers,
- const std::wstring& name);
std::string GetSpecificHeader(const std::string& headers,
const std::string& name);
// Return the value of the HTTP response header field's parameter named
// 'param_name'. Returns the empty string if the parameter is not found or is
// improperly formatted.
-std::wstring GetHeaderParamValue(const std::wstring& field,
- const std::wstring& param_name,
- QuoteRule::Type quote_rule);
-std::string GetHeaderParamValue(const std::string& field,
+std::string GetHeaderParamValue(const std::string& header,
const std::string& param_name,
QuoteRule::Type quote_rule);
@@ -197,29 +192,14 @@
// Latin letters in the ASCII range can be mixed with a limited set of
// script-language pairs (currently Han, Kana and Hangul for zh,ja and ko).
// When |languages| is empty, even that mixing is not allowed.
-//
-// (|offset[s]_for_adjustment|) specifies one or more offsets into the original
-// |url|'s spec(); each offset will be adjusted to point at the same logical
-// place in the result strings during decoding. If this isn't possible because
-// an offset points past the end of |host| or into the middle of a punycode
-// sequence, the offending offset will be set to std::wstring::npos.
-// |offset[s]_for_adjustment| may be NULL.
-std::wstring IDNToUnicode(const char* host,
- size_t host_len,
- const std::wstring& languages,
- size_t* offset_for_adjustment);
-std::wstring IDNToUnicodeWithOffsets(
- const char* host,
- size_t host_len,
- const std::wstring& languages,
- std::vector<size_t>* offsets_for_adjustment);
+string16 IDNToUnicode(const char* host,
+ size_t host_len,
+ const std::string& languages);
// Canonicalizes |host| and returns it. Also fills |host_info| with
// IP address information. |host_info| must not be NULL.
std::string CanonicalizeHost(const std::string& host,
url_canon::CanonHostInfo* host_info);
-std::string CanonicalizeHost(const std::wstring& host,
- url_canon::CanonHostInfo* host_info);
// Returns true if |host| is not an IP address and is compliant with a set of
// rules based on RFC 1738 and tweaked to be compatible with the real world.
@@ -304,16 +284,16 @@
// place in the result strings after reformatting of the host. If this isn't
// possible because an offset points past the end of the host or into the middle
// of a multi-character sequence, the offending offset will be set to
-// std::wstring::npos. |offset[s]_for_adjustment| may be NULL.
+// string16::npos. |offset[s]_for_adjustment| may be NULL.
void AppendFormattedHost(const GURL& url,
- const std::wstring& languages,
- std::wstring* output,
+ const std::string& languages,
+ string16* output,
url_parse::Parsed* new_parsed,
size_t* offset_for_adjustment);
void AppendFormattedHostWithOffsets(
const GURL& url,
- const std::wstring& languages,
- std::wstring* output,
+ const std::string& languages,
+ string16* output,
url_parse::Parsed* new_parsed,
std::vector<size_t>* offsets_for_adjustment);
« no previous file with comments | « net/base/escape_unittest.cc ('k') | net/base/net_util.cc » ('j') | net/base/net_util.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698