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

Unified Diff: chrome/browser/net/certificate_error_reporter.cc

Issue 1134283003: Add HTTP certificate report URL with Finch gate (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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
Index: chrome/browser/net/certificate_error_reporter.cc
diff --git a/chrome/browser/net/certificate_error_reporter.cc b/chrome/browser/net/certificate_error_reporter.cc
index bb378842ce8bf4f424f12561fdb245298a3b3c14..a97d1b70bfde72c9388ae652dba816be84246e36 100644
--- a/chrome/browser/net/certificate_error_reporter.cc
+++ b/chrome/browser/net/certificate_error_reporter.cc
@@ -7,6 +7,7 @@
#include <set>
#include "base/logging.h"
+#include "base/metrics/field_trial.h"
#include "base/stl_util.h"
#include "base/time/time.h"
#include "chrome/browser/net/cert_logger.pb.h"
@@ -124,6 +125,12 @@ void AddCertStatusToReportErrors(
namespace chrome_browser_net {
+// Constants for the Finch trial that controls whether the
+// CertificateErrorReporter supports HTTP uploads.
+const char kHttpCertificateUploadExperiment[] =
felt 2015/05/13 20:24:12 are these in the shared namespace for the unit tes
estark 2015/05/13 20:25:45 Yes. Should I put a comment saying so?
felt 2015/05/13 21:03:34 No, just htinking that normally they would be in a
+ "ReportCertificateErrorsOverHttp";
+const char kHttpCertificateUploadGroup[] = "UploadReportsOverHttp";
+
CertificateErrorReporter::CertificateErrorReporter(
net::URLRequestContext* request_context,
const GURL& upload_url,
@@ -219,7 +226,8 @@ scoped_ptr<net::URLRequest> CertificateErrorReporter::CreateURLRequest(
bool CertificateErrorReporter::IsHttpUploadUrlSupported() {
#if defined(USE_OPENSSL)
- return true;
+ return base::FieldTrialList::FindFullName(kHttpCertificateUploadExperiment) ==
+ kHttpCertificateUploadGroup;
#else
return false;
#endif
« no previous file with comments | « chrome/browser/net/certificate_error_reporter.h ('k') | chrome/browser/net/certificate_error_reporter_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698