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

Side by Side Diff: net/url_request/url_request_http_job.cc

Issue 1594973004: Remove use of void** from HttpResponseHeaders::EnumerateHeaderLines (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix Created 4 years, 11 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 unified diff | Download patch
« no previous file with comments | « net/spdy/spdy_network_transaction_unittest.cc ('k') | net/url_request/view_cache_helper.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "net/url_request/url_request_http_job.h" 5 #include "net/url_request/url_request_http_job.h"
6 6
7 #include "base/base_switches.h" 7 #include "base/base_switches.h"
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/bind_helpers.h" 9 #include "base/bind_helpers.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 930 matching lines...) Expand 10 before | Expand all | Expand 10 after
941 941
942 const URLRequestContext* context = request_->context(); 942 const URLRequestContext* context = request_->context();
943 943
944 if (result == OK) { 944 if (result == OK) {
945 if (transaction_ && transaction_->GetResponseInfo()) { 945 if (transaction_ && transaction_->GetResponseInfo()) {
946 SetProxyServer(transaction_->GetResponseInfo()->proxy_server); 946 SetProxyServer(transaction_->GetResponseInfo()->proxy_server);
947 } 947 }
948 scoped_refptr<HttpResponseHeaders> headers = GetResponseHeaders(); 948 scoped_refptr<HttpResponseHeaders> headers = GetResponseHeaders();
949 949
950 if (headers) { 950 if (headers) {
951 void* iter = NULL; 951 size_t iter = 0;
952 std::string name; 952 std::string name;
953 std::string value; 953 std::string value;
954 bool invalid_header_values_in_rfc7230 = false; 954 bool invalid_header_values_in_rfc7230 = false;
955 while (headers->EnumerateHeaderLines(&iter, &name, &value)) { 955 while (headers->EnumerateHeaderLines(&iter, &name, &value)) {
956 if (!HttpUtil::IsValidHeaderValueRFC7230(value)) { 956 if (!HttpUtil::IsValidHeaderValueRFC7230(value)) {
957 invalid_header_values_in_rfc7230 = true; 957 invalid_header_values_in_rfc7230 = true;
958 break; 958 break;
959 } 959 }
960 } 960 }
961 UMA_HISTOGRAM_BOOLEAN( 961 UMA_HISTOGRAM_BOOLEAN(
(...skipping 648 matching lines...) Expand 10 before | Expand all | Expand 10 after
1610 return override_response_headers_.get() ? 1610 return override_response_headers_.get() ?
1611 override_response_headers_.get() : 1611 override_response_headers_.get() :
1612 transaction_->GetResponseInfo()->headers.get(); 1612 transaction_->GetResponseInfo()->headers.get();
1613 } 1613 }
1614 1614
1615 void URLRequestHttpJob::NotifyURLRequestDestroyed() { 1615 void URLRequestHttpJob::NotifyURLRequestDestroyed() {
1616 awaiting_callback_ = false; 1616 awaiting_callback_ = false;
1617 } 1617 }
1618 1618
1619 } // namespace net 1619 } // namespace net
OLDNEW
« no previous file with comments | « net/spdy/spdy_network_transaction_unittest.cc ('k') | net/url_request/view_cache_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698