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 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
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 server. |
105 void FinishCertCollection(); | 106 void FinishCertCollection( |
Ryan Sleevi
2015/05/14 04:31:03
Update comment :)
estark
2015/05/14 13:50:29
Done.
| |
107 CertificateErrorReport::ProceedDecision user_proceeded); | |
106 | 108 |
107 // Check whether a checkbox should be shown on the page that allows | 109 // Check whether a checkbox should be shown on the page that allows |
108 // the user to opt in to Safe Browsing extended reporting. | 110 // the user to opt in to Safe Browsing extended reporting. |
109 bool ShouldShowCertificateReporterCheckbox(); | 111 bool ShouldShowCertificateReporterCheckbox(); |
110 | 112 |
111 // Returns true if an certificate report should be sent for the SSL | 113 // Returns true if an certificate report should be sent for the SSL |
112 // error for this page. | 114 // error for this page. |
113 bool ShouldReportCertificateError(); | 115 bool ShouldReportCertificateError(); |
114 | 116 |
115 base::Callback<void(bool)> callback_; | 117 base::Callback<void(bool)> callback_; |
(...skipping 26 matching lines...) Expand all Loading... | |
142 // Which type of interstitial this is. | 144 // Which type of interstitial this is. |
143 enum SSLInterstitialReason { | 145 enum SSLInterstitialReason { |
144 SSL_REASON_SSL, | 146 SSL_REASON_SSL, |
145 SSL_REASON_BAD_CLOCK | 147 SSL_REASON_BAD_CLOCK |
146 } interstitial_reason_; | 148 } interstitial_reason_; |
147 | 149 |
148 DISALLOW_COPY_AND_ASSIGN(SSLBlockingPage); | 150 DISALLOW_COPY_AND_ASSIGN(SSLBlockingPage); |
149 }; | 151 }; |
150 | 152 |
151 #endif // CHROME_BROWSER_SSL_SSL_BLOCKING_PAGE_H_ | 153 #endif // CHROME_BROWSER_SSL_SSL_BLOCKING_PAGE_H_ |
OLD | NEW |