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

Side by Side Diff: chrome/browser/ssl/chrome_expect_ct_reporter.h

Issue 2026213002: Refactor CertificateReportSender (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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 unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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_CHROME_EXPECT_CT_REPORTER_H_ 5 #ifndef CHROME_BROWSER_SSL_CHROME_EXPECT_CT_REPORTER_H_
6 #define CHROME_BROWSER_SSL_CHROME_EXPECT_CT_REPORTER_H_ 6 #define CHROME_BROWSER_SSL_CHROME_EXPECT_CT_REPORTER_H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
11 #include "net/http/transport_security_state.h" 11 #include "net/http/transport_security_state.h"
12 12
13 namespace net { 13 namespace net {
14 class CertificateReportSender; 14 class ReportSender;
15 class URLRequestContext; 15 class URLRequestContext;
16 } // namespace net 16 } // namespace net
17 17
18 // This class monitors for violations of CT policy and sends reports 18 // This class monitors for violations of CT policy and sends reports
19 // about failures for sites that have opted in. Must be deleted before 19 // about failures for sites that have opted in. Must be deleted before
20 // the URLRequestContext that is passed to the constructor, so that it 20 // the URLRequestContext that is passed to the constructor, so that it
21 // can cancel its requests. 21 // can cancel its requests.
22 class ChromeExpectCTReporter 22 class ChromeExpectCTReporter
23 : public net::TransportSecurityState::ExpectCTReporter { 23 : public net::TransportSecurityState::ExpectCTReporter {
24 public: 24 public:
25 explicit ChromeExpectCTReporter(net::URLRequestContext* request_context); 25 explicit ChromeExpectCTReporter(net::URLRequestContext* request_context);
26 ~ChromeExpectCTReporter() override; 26 ~ChromeExpectCTReporter() override;
27 27
28 // net::ExpectCTReporter: 28 // net::ExpectCTReporter:
29 void OnExpectCTFailed(const net::HostPortPair& host_port_pair, 29 void OnExpectCTFailed(const net::HostPortPair& host_port_pair,
30 const GURL& report_uri, 30 const GURL& report_uri,
31 const net::SSLInfo& ssl_info) override; 31 const net::SSLInfo& ssl_info) override;
32 32
33 private: 33 private:
34 FRIEND_TEST_ALL_PREFIXES(ChromeExpectCTReporterTest, FeatureDisabled); 34 FRIEND_TEST_ALL_PREFIXES(ChromeExpectCTReporterTest, FeatureDisabled);
35 FRIEND_TEST_ALL_PREFIXES(ChromeExpectCTReporterTest, EmptyReportURI); 35 FRIEND_TEST_ALL_PREFIXES(ChromeExpectCTReporterTest, EmptyReportURI);
36 FRIEND_TEST_ALL_PREFIXES(ChromeExpectCTReporterTest, SendReport); 36 FRIEND_TEST_ALL_PREFIXES(ChromeExpectCTReporterTest, SendReport);
37 37
38 std::unique_ptr<net::CertificateReportSender> report_sender_; 38 std::unique_ptr<net::ReportSender> report_sender_;
39 39
40 DISALLOW_COPY_AND_ASSIGN(ChromeExpectCTReporter); 40 DISALLOW_COPY_AND_ASSIGN(ChromeExpectCTReporter);
41 }; 41 };
42 42
43 #endif // CHROME_BROWSER_SSL_CHROME_EXPECT_CT_REPORTER_H_ 43 #endif // CHROME_BROWSER_SSL_CHROME_EXPECT_CT_REPORTER_H_
OLDNEW
« no previous file with comments | « chrome/browser/ssl/certificate_reporting_test_utils.cc ('k') | chrome/browser/ssl/chrome_expect_ct_reporter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698