OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_SSL_BLOCKING_PAGE_H_ | 5 #ifndef CHROME_BROWSER_SSL_SSL_BLOCKING_PAGE_H_ |
6 #define CHROME_BROWSER_SSL_SSL_BLOCKING_PAGE_H_ | 6 #define CHROME_BROWSER_SSL_SSL_BLOCKING_PAGE_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
11 #include "base/callback.h" | 11 #include "base/callback.h" |
12 #include "base/strings/string16.h" | 12 #include "base/strings/string16.h" |
13 #include "base/task/cancelable_task_tracker.h" | 13 #include "base/task/cancelable_task_tracker.h" |
14 #include "base/time/time.h" | 14 #include "base/time/time.h" |
15 #include "chrome/browser/interstitials/security_interstitial_page.h" | 15 #include "chrome/browser/interstitials/security_interstitial_page.h" |
16 #include "chrome/browser/profiles/profile.h" | 16 #include "chrome/browser/profiles/profile.h" |
| 17 #include "chrome/browser/ssl/certificate_error_report.h" |
17 #include "chrome/browser/ssl/ssl_cert_reporter.h" | 18 #include "chrome/browser/ssl/ssl_cert_reporter.h" |
18 #include "net/ssl/ssl_info.h" | 19 #include "net/ssl/ssl_info.h" |
19 #include "url/gurl.h" | 20 #include "url/gurl.h" |
20 | 21 |
21 // Constants for the HTTPSErrorReporter Finch experiment | 22 // Constants for the HTTPSErrorReporter Finch experiment |
22 extern const char kHTTPSErrorReporterFinchExperimentName[]; | 23 extern const char kHTTPSErrorReporterFinchExperimentName[]; |
23 extern const char kHTTPSErrorReporterFinchGroupShowPossiblySend[]; | 24 extern const char kHTTPSErrorReporterFinchGroupShowPossiblySend[]; |
24 extern const char kHTTPSErrorReporterFinchGroupDontShowDontSend[]; | 25 extern const char kHTTPSErrorReporterFinchGroupDontShowDontSend[]; |
25 extern const char kHTTPSErrorReporterFinchParamName[]; | 26 extern const char kHTTPSErrorReporterFinchParamName[]; |
26 | 27 |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
94 | 95 |
95 void PopulateExtendedReportingOption(base::DictionaryValue* load_time_data); | 96 void PopulateExtendedReportingOption(base::DictionaryValue* load_time_data); |
96 | 97 |
97 private: | 98 private: |
98 void NotifyDenyCertificate(); | 99 void NotifyDenyCertificate(); |
99 void NotifyAllowCertificate(); | 100 void NotifyAllowCertificate(); |
100 | 101 |
101 std::string GetUmaHistogramPrefix() const; | 102 std::string GetUmaHistogramPrefix() const; |
102 std::string GetSamplingEventName() const; | 103 std::string GetSamplingEventName() const; |
103 | 104 |
104 // Send a report about an invalid certificate to the server. | 105 // Send a report about an invalid certificate to the |
105 void FinishCertCollection(); | 106 // server. |user_proceeded| indicates whether the user clicked through |
| 107 // the interstitial or not, and will be included in the report. |
| 108 void FinishCertCollection( |
| 109 CertificateErrorReport::ProceedDecision user_proceeded); |
106 | 110 |
107 // Check whether a checkbox should be shown on the page that allows | 111 // Check whether a checkbox should be shown on the page that allows |
108 // the user to opt in to Safe Browsing extended reporting. | 112 // the user to opt in to Safe Browsing extended reporting. |
109 bool ShouldShowCertificateReporterCheckbox(); | 113 bool ShouldShowCertificateReporterCheckbox(); |
110 | 114 |
111 // Returns true if an certificate report should be sent for the SSL | 115 // Returns true if an certificate report should be sent for the SSL |
112 // error for this page. | 116 // error for this page. |
113 bool ShouldReportCertificateError(); | 117 bool ShouldReportCertificateError(); |
114 | 118 |
115 base::Callback<void(bool)> callback_; | 119 base::Callback<void(bool)> callback_; |
(...skipping 26 matching lines...) Expand all Loading... |
142 // Which type of interstitial this is. | 146 // Which type of interstitial this is. |
143 enum SSLInterstitialReason { | 147 enum SSLInterstitialReason { |
144 SSL_REASON_SSL, | 148 SSL_REASON_SSL, |
145 SSL_REASON_BAD_CLOCK | 149 SSL_REASON_BAD_CLOCK |
146 } interstitial_reason_; | 150 } interstitial_reason_; |
147 | 151 |
148 DISALLOW_COPY_AND_ASSIGN(SSLBlockingPage); | 152 DISALLOW_COPY_AND_ASSIGN(SSLBlockingPage); |
149 }; | 153 }; |
150 | 154 |
151 #endif // CHROME_BROWSER_SSL_SSL_BLOCKING_PAGE_H_ | 155 #endif // CHROME_BROWSER_SSL_SSL_BLOCKING_PAGE_H_ |
OLD | NEW |