| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CHROME_BROWSER_SSL_CERT_REPORT_HELPER_H_ | 5 #ifndef CHROME_BROWSER_SSL_CERT_REPORT_HELPER_H_ |
| 6 #define CHROME_BROWSER_SSL_CERT_REPORT_HELPER_H_ | 6 #define CHROME_BROWSER_SSL_CERT_REPORT_HELPER_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| (...skipping 30 matching lines...) Expand all Loading... |
| 41 const GURL& request_url, | 41 const GURL& request_url, |
| 42 const net::SSLInfo& ssl_info, | 42 const net::SSLInfo& ssl_info, |
| 43 certificate_reporting::ErrorReport::InterstitialReason | 43 certificate_reporting::ErrorReport::InterstitialReason |
| 44 interstitial_reason, | 44 interstitial_reason, |
| 45 bool overridable, | 45 bool overridable, |
| 46 const base::Time& interstitial_time, | 46 const base::Time& interstitial_time, |
| 47 security_interstitials::MetricsHelper* metrics_helper); | 47 security_interstitials::MetricsHelper* metrics_helper); |
| 48 | 48 |
| 49 virtual ~CertReportHelper(); | 49 virtual ~CertReportHelper(); |
| 50 | 50 |
| 51 // This method can be called by tests to fake an official build (reports are |
| 52 // only sent from official builds). |
| 53 static void SetFakeOfficialBuildForTesting(); |
| 54 |
| 51 // Populates data that JavaScript code on the interstitial uses to show | 55 // Populates data that JavaScript code on the interstitial uses to show |
| 52 // the checkbox. | 56 // the checkbox. |
| 53 void PopulateExtendedReportingOption(base::DictionaryValue* load_time_data); | 57 void PopulateExtendedReportingOption(base::DictionaryValue* load_time_data); |
| 54 | 58 |
| 55 // Sends a report about an invalid certificate to the | 59 // Sends a report about an invalid certificate to the |
| 56 // server. |user_proceeded| indicates whether the user clicked through | 60 // server. |user_proceeded| indicates whether the user clicked through |
| 57 // the interstitial or not, and will be included in the report. | 61 // the interstitial or not, and will be included in the report. |
| 58 void FinishCertCollection( | 62 void FinishCertCollection( |
| 59 certificate_reporting::ErrorReport::ProceedDecision user_proceeded); | 63 certificate_reporting::ErrorReport::ProceedDecision user_proceeded); |
| 60 | 64 |
| (...skipping 29 matching lines...) Expand all Loading... |
| 90 bool overridable_; | 94 bool overridable_; |
| 91 // The time at which the interstitial was constructed. | 95 // The time at which the interstitial was constructed. |
| 92 const base::Time interstitial_time_; | 96 const base::Time interstitial_time_; |
| 93 // Helpful for recording metrics about cert reports. | 97 // Helpful for recording metrics about cert reports. |
| 94 security_interstitials::MetricsHelper* metrics_helper_; | 98 security_interstitials::MetricsHelper* metrics_helper_; |
| 95 | 99 |
| 96 DISALLOW_COPY_AND_ASSIGN(CertReportHelper); | 100 DISALLOW_COPY_AND_ASSIGN(CertReportHelper); |
| 97 }; | 101 }; |
| 98 | 102 |
| 99 #endif // CHROME_BROWSER_SSL_CERT_REPORT_HELPER_H_ | 103 #endif // CHROME_BROWSER_SSL_CERT_REPORT_HELPER_H_ |
| OLD | NEW |