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

Unified Diff: net/http/http_response_info.cc

Issue 6488010: Propagate the remote socket address to URLRequest and to ViewHostMsg_FrameNavigate. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: propagate GetPeerAddressErrors, and sync Created 9 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
Index: net/http/http_response_info.cc
diff --git a/net/http/http_response_info.cc b/net/http/http_response_info.cc
index 2c23faac4e1bb7e21ad81fa9cbd38e12f5b2beec..e3b12185d7014a75bcf44051c933e94116d5540b 100644
--- a/net/http/http_response_info.cc
+++ b/net/http/http_response_info.cc
@@ -74,6 +74,7 @@ HttpResponseInfo::HttpResponseInfo(const HttpResponseInfo& rhs)
was_npn_negotiated(rhs.was_npn_negotiated),
was_alternate_protocol_available(rhs.was_alternate_protocol_available),
was_fetched_via_proxy(rhs.was_fetched_via_proxy),
+ socket_address(rhs.socket_address),
eroman 2011/02/16 21:41:13 Out of curiosity, how did you know to update these
pmarks 2011/02/16 23:08:01 That part came from my original CL. I can't recal
request_time(rhs.request_time),
response_time(rhs.response_time),
auth_challenge(rhs.auth_challenge),
@@ -93,6 +94,7 @@ HttpResponseInfo& HttpResponseInfo::operator=(const HttpResponseInfo& rhs) {
was_npn_negotiated = rhs.was_npn_negotiated;
was_alternate_protocol_available = rhs.was_alternate_protocol_available;
was_fetched_via_proxy = rhs.was_fetched_via_proxy;
+ socket_address = rhs.socket_address;
request_time = rhs.request_time;
response_time = rhs.response_time;
auth_challenge = rhs.auth_challenge;
@@ -158,6 +160,11 @@ bool HttpResponseInfo::InitFromPickle(const Pickle& pickle,
return false;
}
+ // Read socket_address. This was not always present in the response info,
+ // so we don't fail if it can't be read. If additional fields are added in
+ // a future version, then they must only be read if this operation succeeds.
+ pickle.ReadString(&iter, &socket_address);
+
was_fetched_via_spdy = (flags & RESPONSE_INFO_WAS_SPDY) != 0;
was_npn_negotiated = (flags & RESPONSE_INFO_WAS_NPN) != 0;
@@ -223,6 +230,8 @@ void HttpResponseInfo::Persist(Pickle* pickle,
if (vary_data.is_valid())
vary_data.Persist(pickle);
+
+ pickle->WriteString(socket_address);
}
} // namespace net

Powered by Google App Engine
This is Rietveld 408576698