diff options
author | darin@chromium.org <darin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-11-18 04:39:38 +0000 |
---|---|---|
committer | darin@chromium.org <darin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-11-18 04:39:38 +0000 |
commit | 61c839f7ee945fa278ab415a0fbc790b023e65ad (patch) | |
tree | 72437ce47744b7e7fd868367ca9899899e252dcc /webkit/glue/multipart_response_delegate.cc | |
parent | fdeae91eb3ac9cc18e5969cc65f3efb593005734 (diff) | |
download | chromium_src-61c839f7ee945fa278ab415a0fbc790b023e65ad.zip chromium_src-61c839f7ee945fa278ab415a0fbc790b023e65ad.tar.gz chromium_src-61c839f7ee945fa278ab415a0fbc790b023e65ad.tar.bz2 |
Some easy cleanup to remove unnecessary config.h and glue_util.h dependencies.
R=yaar
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/402032
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@32287 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/glue/multipart_response_delegate.cc')
-rw-r--r-- | webkit/glue/multipart_response_delegate.cc | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/webkit/glue/multipart_response_delegate.cc b/webkit/glue/multipart_response_delegate.cc index 2306760..a9c60ca 100644 --- a/webkit/glue/multipart_response_delegate.cc +++ b/webkit/glue/multipart_response_delegate.cc @@ -12,7 +12,6 @@ #include "third_party/WebKit/WebKit/chromium/public/WebString.h" #include "third_party/WebKit/WebKit/chromium/public/WebURL.h" #include "third_party/WebKit/WebKit/chromium/public/WebURLLoaderClient.h" -#include "webkit/glue/glue_util.h" using WebKit::WebHTTPHeaderVisitor; using WebKit::WebString; @@ -41,7 +40,7 @@ class HeaderCopier : public WebHTTPHeaderVisitor { : response_(response) { } virtual void visitHeader(const WebString& name, const WebString& value) { - const std::string& name_utf8 = WebStringToStdString(name); + const std::string& name_utf8 = name.utf8(); for (size_t i = 0; i < arraysize(kReplaceHeaders); ++i) { if (LowerCaseEqualsASCII(name_utf8, kReplaceHeaders[i])) return; @@ -214,8 +213,8 @@ bool MultipartResponseDelegate::ParseHeaders() { net::HttpUtil::ParseContentType(content_type, &mime_type, &charset, &has_charset); WebURLResponse response(original_response_.url()); - response.setMIMEType(StdStringToWebString(mime_type)); - response.setTextEncodingName(StdStringToWebString(charset)); + response.setMIMEType(WebString::fromUTF8(mime_type)); + response.setTextEncodingName(WebString::fromUTF8(charset)); HeaderCopier copier(&response); original_response_.visitHTTPHeaderFields(&copier); @@ -224,8 +223,8 @@ bool MultipartResponseDelegate::ParseHeaders() { std::string name(kReplaceHeaders[i]); std::string value = net::GetSpecificHeader(headers, name); if (!value.empty()) { - response.setHTTPHeaderField(StdStringToWebString(name), - StdStringToWebString(value)); + response.setHTTPHeaderField(WebString::fromUTF8(name), + WebString::fromUTF8(value)); } } // Send the response! @@ -255,8 +254,8 @@ size_t MultipartResponseDelegate::FindBoundary() { bool MultipartResponseDelegate::ReadMultipartBoundary( const WebURLResponse& response, std::string* multipart_boundary) { - std::string content_type = WebStringToStdString( - response.httpHeaderField(WebString::fromUTF8("Content-Type"))); + std::string content_type = + response.httpHeaderField(WebString::fromUTF8("Content-Type")).utf8(); size_t boundary_start_offset = content_type.find("boundary="); if (boundary_start_offset == std::wstring::npos) { @@ -286,8 +285,8 @@ bool MultipartResponseDelegate::ReadContentRanges( int* content_range_lower_bound, int* content_range_upper_bound) { - std::string content_range = WebStringToStdString( - response.httpHeaderField(WebString::fromUTF8("Content-Range"))); + std::string content_range = + response.httpHeaderField(WebString::fromUTF8("Content-Range")).utf8(); size_t byte_range_lower_bound_start_offset = content_range.find(" "); if (byte_range_lower_bound_start_offset == std::string::npos) { |