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

Unified Diff: content/browser/loader/resource_loader.cc

Issue 1772603002: Addition of Certificate Transparency details to Security panel of DevTools (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: removed some unnecessary includes and fixed order in net.gypi Created 4 years, 8 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 side-by-side diff with in-line comments
Download patch
Index: content/browser/loader/resource_loader.cc
diff --git a/content/browser/loader/resource_loader.cc b/content/browser/loader/resource_loader.cc
index 40e1f2a60746f96da3530f967c37a3dd82ee3edf..0163428f1b8ba27d26fdc6f89c19c4d1ad8fda1c 100644
--- a/content/browser/loader/resource_loader.cc
+++ b/content/browser/loader/resource_loader.cc
@@ -28,7 +28,6 @@
#include "content/public/browser/cert_store.h"
#include "content/public/browser/resource_context.h"
#include "content/public/browser/resource_dispatcher_host_login_delegate.h"
-#include "content/public/browser/signed_certificate_timestamp_store.h"
#include "content/public/common/content_client.h"
#include "content/public/common/content_switches.h"
#include "content/public/common/process_type.h"
@@ -49,20 +48,6 @@ using base::TimeTicks;
namespace content {
namespace {
-void StoreSignedCertificateTimestamps(
- const net::SignedCertificateTimestampAndStatusList& sct_list,
- int process_id,
- SignedCertificateTimestampIDStatusList* sct_ids) {
- SignedCertificateTimestampStore* sct_store(
- SignedCertificateTimestampStore::GetInstance());
-
- for (auto iter = sct_list.begin(); iter != sct_list.end(); ++iter) {
- const int sct_id(sct_store->Store(iter->sct.get(), process_id));
- sct_ids->push_back(
- SignedCertificateTimestampIDAndStatus(sct_id, iter->status));
- }
-}
-
void GetSSLStatusForRequest(const GURL& url,
const net::SSLInfo& ssl_info,
int child_id,
@@ -71,13 +56,9 @@ void GetSSLStatusForRequest(const GURL& url,
DCHECK(ssl_info.cert);
int cert_id = cert_store->StoreCert(ssl_info.cert.get(), child_id);
- SignedCertificateTimestampIDStatusList signed_certificate_timestamp_ids;
- StoreSignedCertificateTimestamps(ssl_info.signed_certificate_timestamps,
- child_id, &signed_certificate_timestamp_ids);
-
*ssl_status = SSLStatus(SSLPolicy::GetSecurityStyleForResource(
url, cert_id, ssl_info.cert_status),
- cert_id, signed_certificate_timestamp_ids, ssl_info);
+ cert_id, ssl_info);
}
void PopulateResourceResponse(ResourceRequestInfoImpl* info,
@@ -121,6 +102,8 @@ void PopulateResourceResponse(ResourceRequestInfoImpl* info,
response->head.has_major_certificate_errors =
net::IsCertStatusError(ssl_status.cert_status) &&
!net::IsCertStatusMinorError(ssl_status.cert_status);
+ response->head.signed_certificate_timestamps =
+ request->ssl_info().signed_certificate_timestamps;
} else {
// We should not have any SSL state.
DCHECK(!request->ssl_info().cert_status);

Powered by Google App Engine
This is Rietveld 408576698