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

Side by Side Diff: net/http/http_network_transaction.cc

Issue 2278823003: Change net::LOAD_MAIN_FRAME to net::LOAD_MAIN_FRAME_DEPRECATED to discourage (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added deprecation flag to two recent tests. Created 4 years, 3 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/http/http_cache_transaction.cc ('k') | net/nqe/network_quality_estimator.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/http/http_network_transaction.h" 5 #include "net/http/http_network_transaction.h"
6 6
7 #include <memory> 7 #include <memory>
8 #include <set> 8 #include <set>
9 #include <utility> 9 #include <utility>
10 #include <vector> 10 #include <vector>
(...skipping 1173 matching lines...) Expand 10 before | Expand all | Expand 10 after
1184 net_log_.AddEventWithNetErrorCode( 1184 net_log_.AddEventWithNetErrorCode(
1185 NetLog::TYPE_HTTP_TRANSACTION_RESTART_AFTER_ERROR, 1185 NetLog::TYPE_HTTP_TRANSACTION_RESTART_AFTER_ERROR,
1186 response_.headers->response_code()); 1186 response_.headers->response_code());
1187 // This will close the socket - it would be weird to try and reuse it, even 1187 // This will close the socket - it would be weird to try and reuse it, even
1188 // if the server doesn't actually close it. 1188 // if the server doesn't actually close it.
1189 ResetConnectionAndRequestForResend(); 1189 ResetConnectionAndRequestForResend();
1190 return OK; 1190 return OK;
1191 } 1191 }
1192 1192
1193 // Like Net.HttpResponseCode, but only for MAIN_FRAME loads. 1193 // Like Net.HttpResponseCode, but only for MAIN_FRAME loads.
1194 if (request_->load_flags & LOAD_MAIN_FRAME) { 1194 if (request_->load_flags & LOAD_MAIN_FRAME_DEPRECATED) {
1195 const int response_code = response_.headers->response_code(); 1195 const int response_code = response_.headers->response_code();
1196 UMA_HISTOGRAM_ENUMERATION( 1196 UMA_HISTOGRAM_ENUMERATION(
1197 "Net.HttpResponseCode_Nxx_MainFrame", response_code/100, 10); 1197 "Net.HttpResponseCode_Nxx_MainFrame", response_code/100, 10);
1198 } 1198 }
1199 1199
1200 net_log_.AddEvent( 1200 net_log_.AddEvent(
1201 NetLog::TYPE_HTTP_TRANSACTION_READ_RESPONSE_HEADERS, 1201 NetLog::TYPE_HTTP_TRANSACTION_READ_RESPONSE_HEADERS,
1202 base::Bind(&HttpResponseHeaders::NetLogCallback, response_.headers)); 1202 base::Bind(&HttpResponseHeaders::NetLogCallback, response_.headers));
1203 1203
1204 if (response_.headers->GetHttpVersion() < HttpVersion(1, 0)) { 1204 if (response_.headers->GetHttpVersion() < HttpVersion(1, 0)) {
(...skipping 464 matching lines...) Expand 10 before | Expand all | Expand 10 after
1669 DCHECK(stream_request_); 1669 DCHECK(stream_request_);
1670 1670
1671 // Since the transaction can restart with auth credentials, it may create a 1671 // Since the transaction can restart with auth credentials, it may create a
1672 // stream more than once. Accumulate all of the connection attempts across 1672 // stream more than once. Accumulate all of the connection attempts across
1673 // those streams by appending them to the vector: 1673 // those streams by appending them to the vector:
1674 for (const auto& attempt : stream_request_->connection_attempts()) 1674 for (const auto& attempt : stream_request_->connection_attempts())
1675 connection_attempts_.push_back(attempt); 1675 connection_attempts_.push_back(attempt);
1676 } 1676 }
1677 1677
1678 } // namespace net 1678 } // namespace net
OLDNEW
« no previous file with comments | « net/http/http_cache_transaction.cc ('k') | net/nqe/network_quality_estimator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698