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

Unified Diff: net/http/http_network_transaction.cc

Issue 1072423005: Set network_accessed earlier, when network transaction creates stream. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Don't break build on iOS Created 5 years, 7 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 | « net/http/http_network_layer_unittest.cc ('k') | net/http/http_network_transaction_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/http/http_network_transaction.cc
diff --git a/net/http/http_network_transaction.cc b/net/http/http_network_transaction.cc
index c094bdbbae1c626d01774e9d9be5204bdd340d4c..3d64b0f799072cc98d114f06f65a2da2c0d7c847 100644
--- a/net/http/http_network_transaction.cc
+++ b/net/http/http_network_transaction.cc
@@ -395,10 +395,7 @@ int64 HttpNetworkTransaction::GetTotalReceivedBytes() const {
void HttpNetworkTransaction::DoneReading() {}
const HttpResponseInfo* HttpNetworkTransaction::GetResponseInfo() const {
- return ((headers_valid_ && response_.headers.get()) ||
- response_.ssl_info.cert.get() || response_.cert_request_info.get())
- ? &response_
- : NULL;
+ return &response_;
}
LoadState HttpNetworkTransaction::GetLoadState() const {
@@ -736,6 +733,8 @@ int HttpNetworkTransaction::DoCreateStream() {
FROM_HERE_WITH_EXPLICIT_FUNCTION(
"424359 HttpNetworkTransaction::DoCreateStream"));
+ response_.network_accessed = true;
+
next_state_ = STATE_CREATE_STREAM_COMPLETE;
if (ForWebSocketHandshake()) {
stream_request_.reset(
@@ -974,7 +973,6 @@ int HttpNetworkTransaction::DoSendRequestComplete(int result) {
send_end_time_ = base::TimeTicks::Now();
if (result < 0)
return HandleIOError(result);
- response_.network_accessed = true;
next_state_ = STATE_READ_HEADERS;
return OK;
}
« no previous file with comments | « net/http/http_network_layer_unittest.cc ('k') | net/http/http_network_transaction_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698