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

Unified Diff: third_party/WebKit/Source/platform/network/HTTPParsers.cpp

Issue 2568343002: GetMimeTypeAndCharset at once (Closed)
Patch Set: Created 4 years 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/platform/network/HTTPParsers.cpp
diff --git a/third_party/WebKit/Source/platform/network/HTTPParsers.cpp b/third_party/WebKit/Source/platform/network/HTTPParsers.cpp
index bd5257dece6b4a7ce03560d17ba556f50cd38c51..948e932e498c60865fe8c0308a70c18d6d6b47c0 100644
--- a/third_party/WebKit/Source/platform/network/HTTPParsers.cpp
+++ b/third_party/WebKit/Source/platform/network/HTTPParsers.cpp
@@ -874,12 +874,9 @@ bool parseMultipartHeadersFromBody(const char* bytes,
new net::HttpResponseHeaders(
net::HttpUtil::AssembleRawHeaders(headers.data(), headers.length()));
- std::string mimeType;
- responseHeaders->GetMimeType(&mimeType);
+ std::string mimeType, charset;
+ responseHeaders->GetMimeTypeAndCharset(&mimeType, &charset);
response->setMimeType(WebString::fromUTF8(mimeType));
-
- std::string charset;
- responseHeaders->GetCharset(&charset);
response->setTextEncodingName(WebString::fromUTF8(charset));
// Copy headers listed in replaceHeaders to the response.
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698