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 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
176 | 176 |
177 // Read response-headers | 177 // Read response-headers |
178 headers = new HttpResponseHeaders(pickle, &iter); | 178 headers = new HttpResponseHeaders(pickle, &iter); |
179 if (headers->response_code() == -1) | 179 if (headers->response_code() == -1) |
180 return false; | 180 return false; |
181 | 181 |
182 // Read ssl-info | 182 // Read ssl-info |
183 if (flags & RESPONSE_INFO_HAS_CERT) { | 183 if (flags & RESPONSE_INFO_HAS_CERT) { |
184 X509Certificate::PickleType type = GetPickleTypeForVersion(version); | 184 X509Certificate::PickleType type = GetPickleTypeForVersion(version); |
185 ssl_info.cert = X509Certificate::CreateFromPickle(pickle, &iter, type); | 185 ssl_info.cert = X509Certificate::CreateFromPickle(pickle, &iter, type); |
186 if (!ssl_info.cert) | 186 if (!ssl_info.cert.get()) |
187 return false; | 187 return false; |
188 } | 188 } |
189 if (flags & RESPONSE_INFO_HAS_CERT_STATUS) { | 189 if (flags & RESPONSE_INFO_HAS_CERT_STATUS) { |
190 CertStatus cert_status; | 190 CertStatus cert_status; |
191 if (!pickle.ReadUInt32(&iter, &cert_status)) | 191 if (!pickle.ReadUInt32(&iter, &cert_status)) |
192 return false; | 192 return false; |
193 ssl_info.cert_status = cert_status; | 193 ssl_info.cert_status = cert_status; |
194 } | 194 } |
195 if (flags & RESPONSE_INFO_HAS_SECURITY_BITS) { | 195 if (flags & RESPONSE_INFO_HAS_SECURITY_BITS) { |
196 int security_bits; | 196 int security_bits; |
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
321 pickle->WriteUInt16(socket_address.port()); | 321 pickle->WriteUInt16(socket_address.port()); |
322 | 322 |
323 if (was_npn_negotiated) | 323 if (was_npn_negotiated) |
324 pickle->WriteString(npn_negotiated_protocol); | 324 pickle->WriteString(npn_negotiated_protocol); |
325 | 325 |
326 if (connection_info != CONNECTION_INFO_UNKNOWN) | 326 if (connection_info != CONNECTION_INFO_UNKNOWN) |
327 pickle->WriteInt(static_cast<int>(connection_info)); | 327 pickle->WriteInt(static_cast<int>(connection_info)); |
328 } | 328 } |
329 | 329 |
330 } // namespace net | 330 } // namespace net |
OLD | NEW |