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

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

Issue 1957483003: Removal of SignedCertificateTimestampStore (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fixed IPC problem Created 4 years, 7 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
« no previous file with comments | « content/browser/loader/resource_loader.h ('k') | content/browser/signed_certificate_timestamp_store_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/loader/resource_loader.cc
diff --git a/content/browser/loader/resource_loader.cc b/content/browser/loader/resource_loader.cc
index 8d31fa1576d373258c6c11a03b129fa703a31613..2bc362262e8949e709da6b8c16ea643ae6de9697 100644
--- a/content/browser/loader/resource_loader.cc
+++ b/content/browser/loader/resource_loader.cc
@@ -29,7 +29,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"
@@ -52,20 +51,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,
@@ -74,13 +59,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,
@@ -136,6 +117,13 @@ void PopulateResourceResponse(ResourceRequestInfoImpl* info,
response->head.has_major_certificate_errors =
net::IsCertStatusError(ssl_status.cert_status) &&
!net::IsCertStatusMinorError(ssl_status.cert_status);
+ if (info->ShouldReportRawHeaders()) {
+ // Only pass the Signed Certificate Timestamps (SCTs) when the network
+ // panel of the DevTools is open, i.e. ShouldReportRawHeaders() is set.
+ // These data are used to populate the requests in the security panel too.
+ 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);
« no previous file with comments | « content/browser/loader/resource_loader.h ('k') | content/browser/signed_certificate_timestamp_store_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698