Index: content/child/web_url_loader_impl.cc |
diff --git a/content/child/web_url_loader_impl.cc b/content/child/web_url_loader_impl.cc |
index 53ce2f5e90d1f4e1da4a0ddab5b99f14029a1031..f1bcf866f3fab7b5b9b0c5af21d2a6d8ad8ac289 100644 |
--- a/content/child/web_url_loader_impl.cc |
+++ b/content/child/web_url_loader_impl.cc |
@@ -38,7 +38,6 @@ |
#include "content/public/child/fixed_received_data.h" |
#include "content/public/child/request_peer.h" |
#include "content/public/common/browser_side_navigation_policy.h" |
-#include "content/public/common/signed_certificate_timestamp_id_and_status.h" |
#include "content/public/common/ssl_status.h" |
#include "net/base/data_url.h" |
#include "net/base/filename_util.h" |
@@ -189,7 +188,7 @@ int GetInfoFromDataURL(const GURL& url, |
} |
void SetSecurityStyleAndDetails(const GURL& url, |
- const std::string& security_info, |
+ const ResourceResponseInfo& info, |
Eran Messeri
2016/05/06 09:01:48
Question: Why is the input parameter type change?
dwaxweiler
2016/05/06 12:45:37
Acknowledged.
|
WebURLResponse* response, |
bool report_security_info) { |
if (!report_security_info) { |
@@ -203,6 +202,7 @@ void SetSecurityStyleAndDetails(const GURL& url, |
// There are cases where an HTTPS request can come in without security |
// info attached (such as a redirect response). |
+ const std::string& security_info = info.security_info; |
if (security_info.empty()) { |
response->setSecurityStyle(WebURLResponse::SecurityStyleUnknown); |
return; |
@@ -256,32 +256,9 @@ void SetSecurityStyleAndDetails(const GURL& url, |
response->setSecurityStyle(securityStyle); |
- SignedCertificateTimestampIDStatusList sct_list = |
- ssl_status.signed_certificate_timestamp_ids; |
- |
- size_t num_unknown_scts = 0; |
- size_t num_invalid_scts = 0; |
- size_t num_valid_scts = 0; |
- |
- SignedCertificateTimestampIDStatusList::iterator iter; |
- for (iter = sct_list.begin(); iter < sct_list.end(); ++iter) { |
- switch (iter->status) { |
- case net::ct::SCT_STATUS_LOG_UNKNOWN: |
- num_unknown_scts++; |
- break; |
- case net::ct::SCT_STATUS_INVALID: |
- num_invalid_scts++; |
- break; |
- case net::ct::SCT_STATUS_OK: |
- num_valid_scts++; |
- break; |
- case net::ct::SCT_STATUS_NONE: |
- case net::ct::SCT_STATUS_MAX: |
- // These enum values do not represent SCTs that are taken into account |
- // for CT compliance calculations, so we ignore them. |
- break; |
- } |
- } |
+ int num_unknown_scts = ssl_status.num_unknown_scts; |
+ int num_invalid_scts = ssl_status.num_invalid_scts; |
+ int num_valid_scts = ssl_status.num_valid_scts; |
blink::WebURLResponse::WebSecurityDetails webSecurityDetails( |
WebString::fromUTF8(protocol), WebString::fromUTF8(key_exchange), |
@@ -980,8 +957,7 @@ void WebURLLoaderImpl::PopulateURLResponse(const GURL& url, |
? blink::WebString::fromUTF8(info.cache_storage_cache_name) |
: blink::WebString()); |
- SetSecurityStyleAndDetails(url, info.security_info, response, |
- report_security_info); |
+ SetSecurityStyleAndDetails(url, info, response, report_security_info); |
WebURLResponseExtraDataImpl* extra_data = |
new WebURLResponseExtraDataImpl(info.npn_negotiated_protocol); |