Chromium Code Reviews| 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 |