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

Unified Diff: google_apis/drive/base_requests.cc

Issue 2670013002: net: remove GetNormalizedHeaders() function (Closed)
Patch Set: n Created 3 years, 10 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
« no previous file with comments | « content/public/test/test_download_request_handler.cc ('k') | google_apis/gaia/gaia_auth_fetcher.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: google_apis/drive/base_requests.cc
diff --git a/google_apis/drive/base_requests.cc b/google_apis/drive/base_requests.cc
index d1aa60d92996300b6d203d0dee5ee8fdbe826858..39492d0f34474ae3f117252dbb9f449784addb4d 100644
--- a/google_apis/drive/base_requests.cc
+++ b/google_apis/drive/base_requests.cc
@@ -95,18 +95,14 @@ void ParseJsonOnBlockingPool(
// Returns response headers as a string. Returns a warning message if
// |url_fetcher| does not contain a valid response. Used only for debugging.
std::string GetResponseHeadersAsString(const URLFetcher* url_fetcher) {
- // net::HttpResponseHeaders::raw_headers(), as the name implies, stores
- // all headers in their raw format, i.e each header is null-terminated.
- // So logging raw_headers() only shows the first header, which is probably
- // the status line. GetNormalizedHeaders, on the other hand, will show all
- // the headers, one per line, which is probably what we want.
std::string headers;
// Check that response code indicates response headers are valid (i.e. not
// malformed) before we retrieve the headers.
if (url_fetcher->GetResponseCode() == URLFetcher::RESPONSE_CODE_INVALID) {
headers.assign("Response headers are malformed!!");
} else {
- url_fetcher->GetResponseHeaders()->GetNormalizedHeaders(&headers);
+ headers = net::HttpUtil::ConvertHeadersBackToHTTPResponse(
+ url_fetcher->GetResponseHeaders()->raw_headers());
}
return headers;
}
« no previous file with comments | « content/public/test/test_download_request_handler.cc ('k') | google_apis/gaia/gaia_auth_fetcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698