OLD | NEW |
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_response_info.h" | 5 #include "net/http/http_response_info.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "base/pickle.h" | 8 #include "base/pickle.h" |
9 #include "base/time.h" | 9 #include "base/time.h" |
10 #include "net/base/auth.h" | 10 #include "net/base/auth.h" |
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
159 | 159 |
160 // read response-headers | 160 // read response-headers |
161 headers = new HttpResponseHeaders(pickle, &iter); | 161 headers = new HttpResponseHeaders(pickle, &iter); |
162 if (headers->response_code() == -1) | 162 if (headers->response_code() == -1) |
163 return false; | 163 return false; |
164 | 164 |
165 // read ssl-info | 165 // read ssl-info |
166 if (flags & RESPONSE_INFO_HAS_CERT) { | 166 if (flags & RESPONSE_INFO_HAS_CERT) { |
167 X509Certificate::PickleType type = GetPickleTypeForVersion(version); | 167 X509Certificate::PickleType type = GetPickleTypeForVersion(version); |
168 ssl_info.cert = X509Certificate::CreateFromPickle(pickle, &iter, type); | 168 ssl_info.cert = X509Certificate::CreateFromPickle(pickle, &iter, type); |
169 if (!ssl_info.cert) | 169 if (!ssl_info.cert.get()) |
170 return false; | 170 return false; |
171 } | 171 } |
172 if (flags & RESPONSE_INFO_HAS_CERT_STATUS) { | 172 if (flags & RESPONSE_INFO_HAS_CERT_STATUS) { |
173 CertStatus cert_status; | 173 CertStatus cert_status; |
174 if (!pickle.ReadUInt32(&iter, &cert_status)) | 174 if (!pickle.ReadUInt32(&iter, &cert_status)) |
175 return false; | 175 return false; |
176 ssl_info.cert_status = cert_status; | 176 ssl_info.cert_status = cert_status; |
177 } | 177 } |
178 if (flags & RESPONSE_INFO_HAS_SECURITY_BITS) { | 178 if (flags & RESPONSE_INFO_HAS_SECURITY_BITS) { |
179 int security_bits; | 179 int security_bits; |
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
283 vary_data.Persist(pickle); | 283 vary_data.Persist(pickle); |
284 | 284 |
285 pickle->WriteString(socket_address.host()); | 285 pickle->WriteString(socket_address.host()); |
286 pickle->WriteUInt16(socket_address.port()); | 286 pickle->WriteUInt16(socket_address.port()); |
287 | 287 |
288 if (was_npn_negotiated) | 288 if (was_npn_negotiated) |
289 pickle->WriteString(npn_negotiated_protocol); | 289 pickle->WriteString(npn_negotiated_protocol); |
290 } | 290 } |
291 | 291 |
292 } // namespace net | 292 } // namespace net |
OLD | NEW |