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

Side by Side Diff: content/browser/loader/resource_loader.cc

Issue 2349713004: Replace key_exchange_info with key_exchange_group. (Closed)
Patch Set: rebase Created 4 years, 3 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 unified diff | Download patch
« no previous file with comments | « no previous file | content/public/browser/ssl_status.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "content/browser/loader/resource_loader.h" 5 #include "content/browser/loader/resource_loader.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/location.h" 10 #include "base/location.h"
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 net::IsCertStatusError(request->ssl_info().cert_status) && 100 net::IsCertStatusError(request->ssl_info().cert_status) &&
101 !net::IsCertStatusMinorError(request->ssl_info().cert_status); 101 !net::IsCertStatusMinorError(request->ssl_info().cert_status);
102 if (info->ShouldReportRawHeaders()) { 102 if (info->ShouldReportRawHeaders()) {
103 // Only pass these members when the network panel of the DevTools is open, 103 // Only pass these members when the network panel of the DevTools is open,
104 // i.e. ShouldReportRawHeaders() is set. These data are used to populate 104 // i.e. ShouldReportRawHeaders() is set. These data are used to populate
105 // the requests in the security panel too. 105 // the requests in the security panel too.
106 response->head.cert_status = request->ssl_info().cert_status; 106 response->head.cert_status = request->ssl_info().cert_status;
107 response->head.ssl_connection_status = 107 response->head.ssl_connection_status =
108 request->ssl_info().connection_status; 108 request->ssl_info().connection_status;
109 response->head.ssl_key_exchange_group = 109 response->head.ssl_key_exchange_group =
110 request->ssl_info().GetKeyExchangeGroup(); 110 request->ssl_info().key_exchange_group;
111 response->head.signed_certificate_timestamps = 111 response->head.signed_certificate_timestamps =
112 request->ssl_info().signed_certificate_timestamps; 112 request->ssl_info().signed_certificate_timestamps;
113 std::string encoded; 113 std::string encoded;
114 bool rv = net::X509Certificate::GetDEREncoded( 114 bool rv = net::X509Certificate::GetDEREncoded(
115 request->ssl_info().cert->os_cert_handle(), &encoded); 115 request->ssl_info().cert->os_cert_handle(), &encoded);
116 DCHECK(rv); 116 DCHECK(rv);
117 response->head.certificate.push_back(encoded); 117 response->head.certificate.push_back(encoded);
118 for (auto& cert : 118 for (auto& cert :
119 request->ssl_info().cert->GetIntermediateCertificates()) { 119 request->ssl_info().cert->GetIntermediateCertificates()) {
120 rv = net::X509Certificate::GetDEREncoded(cert, &encoded); 120 rv = net::X509Certificate::GetDEREncoded(cert, &encoded);
121 DCHECK(rv); 121 DCHECK(rv);
122 response->head.certificate.push_back(encoded); 122 response->head.certificate.push_back(encoded);
123 } 123 }
124 } 124 }
125 } else { 125 } else {
126 // We should not have any SSL state. 126 // We should not have any SSL state.
127 DCHECK(!request->ssl_info().cert_status); 127 DCHECK(!request->ssl_info().cert_status);
128 DCHECK_EQ(request->ssl_info().security_bits, -1); 128 DCHECK_EQ(request->ssl_info().security_bits, -1);
129 DCHECK_EQ(request->ssl_info().key_exchange_info, 0); 129 DCHECK_EQ(request->ssl_info().key_exchange_group, 0);
130 DCHECK(!request->ssl_info().connection_status); 130 DCHECK(!request->ssl_info().connection_status);
131 } 131 }
132 } 132 }
133 133
134 } // namespace 134 } // namespace
135 135
136 ResourceLoader::ResourceLoader(std::unique_ptr<net::URLRequest> request, 136 ResourceLoader::ResourceLoader(std::unique_ptr<net::URLRequest> request,
137 std::unique_ptr<ResourceHandler> handler, 137 std::unique_ptr<ResourceHandler> handler,
138 ResourceLoaderDelegate* delegate) 138 ResourceLoaderDelegate* delegate)
139 : deferred_stage_(DEFERRED_NONE), 139 : deferred_stage_(DEFERRED_NONE),
(...skipping 577 matching lines...) Expand 10 before | Expand all | Expand 10 after
717 } 717 }
718 718
719 UMA_HISTOGRAM_ENUMERATION("Net.Prefetch.Pattern", status, STATUS_MAX); 719 UMA_HISTOGRAM_ENUMERATION("Net.Prefetch.Pattern", status, STATUS_MAX);
720 } else if (request_->response_info().unused_since_prefetch) { 720 } else if (request_->response_info().unused_since_prefetch) {
721 TimeDelta total_time = base::TimeTicks::Now() - request_->creation_time(); 721 TimeDelta total_time = base::TimeTicks::Now() - request_->creation_time();
722 UMA_HISTOGRAM_TIMES("Net.Prefetch.TimeSpentOnPrefetchHit", total_time); 722 UMA_HISTOGRAM_TIMES("Net.Prefetch.TimeSpentOnPrefetchHit", total_time);
723 } 723 }
724 } 724 }
725 725
726 } // namespace content 726 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | content/public/browser/ssl_status.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698