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

Unified Diff: net/http/http_response_info.cc

Issue 818833004: Remove deprecated methods from Pickle. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 6 years 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_response_headers_unittest.cc ('k') | net/http/http_vary_data.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/http/http_response_info.cc
diff --git a/net/http/http_response_info.cc b/net/http/http_response_info.cc
index c3a48272686a980ae74bd6419eddd785ffad4cd2..630a59e8082994ac4f7a91fb89f1d1ff3104aeb3 100644
--- a/net/http/http_response_info.cc
+++ b/net/http/http_response_info.cc
@@ -160,7 +160,7 @@ bool HttpResponseInfo::InitFromPickle(const Pickle& pickle,
// Read flags and verify version
int flags;
- if (!pickle.ReadInt(&iter, &flags))
+ if (!iter.ReadInt(&flags))
return false;
int version = flags & RESPONSE_INFO_VERSION_MASK;
if (version < RESPONSE_INFO_MINIMUM_VERSION ||
@@ -171,57 +171,57 @@ bool HttpResponseInfo::InitFromPickle(const Pickle& pickle,
// Read request-time
int64 time_val;
- if (!pickle.ReadInt64(&iter, &time_val))
+ if (!iter.ReadInt64(&time_val))
return false;
request_time = Time::FromInternalValue(time_val);
was_cached = true; // Set status to show cache resurrection.
// Read response-time
- if (!pickle.ReadInt64(&iter, &time_val))
+ if (!iter.ReadInt64(&time_val))
return false;
response_time = Time::FromInternalValue(time_val);
// Read response-headers
- headers = new HttpResponseHeaders(pickle, &iter);
+ headers = new HttpResponseHeaders(&iter);
if (headers->response_code() == -1)
return false;
// Read ssl-info
if (flags & RESPONSE_INFO_HAS_CERT) {
X509Certificate::PickleType type = GetPickleTypeForVersion(version);
- ssl_info.cert = X509Certificate::CreateFromPickle(pickle, &iter, type);
+ ssl_info.cert = X509Certificate::CreateFromPickle(&iter, type);
if (!ssl_info.cert.get())
return false;
}
if (flags & RESPONSE_INFO_HAS_CERT_STATUS) {
CertStatus cert_status;
- if (!pickle.ReadUInt32(&iter, &cert_status))
+ if (!iter.ReadUInt32(&cert_status))
return false;
ssl_info.cert_status = cert_status;
}
if (flags & RESPONSE_INFO_HAS_SECURITY_BITS) {
int security_bits;
- if (!pickle.ReadInt(&iter, &security_bits))
+ if (!iter.ReadInt(&security_bits))
return false;
ssl_info.security_bits = security_bits;
}
if (flags & RESPONSE_INFO_HAS_SSL_CONNECTION_STATUS) {
int connection_status;
- if (!pickle.ReadInt(&iter, &connection_status))
+ if (!iter.ReadInt(&connection_status))
return false;
ssl_info.connection_status = connection_status;
}
if (flags & RESPONSE_INFO_HAS_SIGNED_CERTIFICATE_TIMESTAMPS) {
int num_scts;
- if (!pickle.ReadInt(&iter, &num_scts))
+ if (!iter.ReadInt(&num_scts))
return false;
for (int i = 0; i < num_scts; ++i) {
scoped_refptr<ct::SignedCertificateTimestamp> sct(
ct::SignedCertificateTimestamp::CreateFromPickle(&iter));
uint16 status;
- if (!sct.get() || !pickle.ReadUInt16(&iter, &status))
+ if (!sct.get() || !iter.ReadUInt16(&status))
return false;
ssl_info.signed_certificate_timestamps.push_back(
SignedCertificateTimestampAndStatus(
@@ -231,16 +231,16 @@ bool HttpResponseInfo::InitFromPickle(const Pickle& pickle,
// Read vary-data
if (flags & RESPONSE_INFO_HAS_VARY_DATA) {
- if (!vary_data.InitFromPickle(pickle, &iter))
+ if (!vary_data.InitFromPickle(&iter))
return false;
}
// Read socket_address.
std::string socket_address_host;
- if (pickle.ReadString(&iter, &socket_address_host)) {
+ if (iter.ReadString(&socket_address_host)) {
// If the host was written, we always expect the port to follow.
uint16 socket_address_port;
- if (!pickle.ReadUInt16(&iter, &socket_address_port))
+ if (!iter.ReadUInt16(&socket_address_port))
return false;
socket_address = HostPortPair(socket_address_host, socket_address_port);
} else if (version > 1) {
@@ -251,14 +251,14 @@ bool HttpResponseInfo::InitFromPickle(const Pickle& pickle,
// Read protocol-version.
if (flags & RESPONSE_INFO_HAS_NPN_NEGOTIATED_PROTOCOL) {
- if (!pickle.ReadString(&iter, &npn_negotiated_protocol))
+ if (!iter.ReadString(&npn_negotiated_protocol))
return false;
}
// Read connection info.
if (flags & RESPONSE_INFO_HAS_CONNECTION_INFO) {
int value;
- if (!pickle.ReadInt(&iter, &value))
+ if (!iter.ReadInt(&value))
return false;
if (value > static_cast<int>(CONNECTION_INFO_UNKNOWN) &&
« no previous file with comments | « net/http/http_response_headers_unittest.cc ('k') | net/http/http_vary_data.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698