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

Unified Diff: chrome/browser/ssl/cert_report_helper.cc

Issue 2448943004: Add experimental feature info to certificate reports (Closed)
Patch Set: undo more unnecessary changes Created 4 years, 1 month 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: chrome/browser/ssl/cert_report_helper.cc
diff --git a/chrome/browser/ssl/cert_report_helper.cc b/chrome/browser/ssl/cert_report_helper.cc
index 092984b0e92b14a2a7e60ed211875022d5e462fb..2a43df819e43c22dee5292e618b04e8d57be393f 100644
--- a/chrome/browser/ssl/cert_report_helper.cc
+++ b/chrome/browser/ssl/cert_report_helper.cc
@@ -17,6 +17,7 @@
#include "chrome/browser/ssl/ssl_cert_reporter.h"
#include "chrome/common/pref_names.h"
#include "chrome/grit/generated_resources.h"
+#include "components/network_time/network_time_tracker.h"
#include "components/prefs/pref_service.h"
#include "components/safe_browsing_db/safe_browsing_prefs.h"
#include "components/security_interstitials/core/controller_client.h"
@@ -114,6 +115,19 @@ void CertReportHelper::FinishCertCollection(
? certificate_reporting::ErrorReport::INTERSTITIAL_OVERRIDABLE
: certificate_reporting::ErrorReport::INTERSTITIAL_NOT_OVERRIDABLE);
+ // Include information about experimental features relevant to
+ // certificate validation. (At present, this is just network time
+ // querying.)
+ std::map<std::string, std::string> params;
+ params[network_time::kVariationsServiceEnableFetchesOnDemand] =
+ variations::GetVariationParamValueByFeature(
+ network_time::kNetworkTimeServiceQuerying,
+ network_time::kVariationsServiceEnableFetchesOnDemand);
+ report.AddFeature(
+ network_time::kNetworkTimeServiceQuerying.name,
+ base::FeatureList::IsEnabled(network_time::kNetworkTimeServiceQuerying),
+ params);
+
if (!report.Serialize(&serialized_report)) {
LOG(ERROR) << "Failed to serialize certificate report.";
return;
« no previous file with comments | « no previous file | components/certificate_reporting/cert_logger.proto » ('j') | components/certificate_reporting/error_report.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698