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

Side by Side Diff: net/http/transport_security_state.h

Issue 1212973002: Add net::CertificateReportSender for handling cert report sending (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add missing NET_EXPORT Created 5 years, 4 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
« no previous file with comments | « chrome/browser/ssl/chrome_fraudulent_certificate_reporter_unittest.cc ('k') | net/net.gypi » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 NET_HTTP_TRANSPORT_SECURITY_STATE_H_ 5 #ifndef NET_HTTP_TRANSPORT_SECURITY_STATE_H_
6 #define NET_HTTP_TRANSPORT_SECURITY_STATE_H_ 6 #define NET_HTTP_TRANSPORT_SECURITY_STATE_H_
7 7
8 #include <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 #include <utility> 10 #include <utility>
(...skipping 28 matching lines...) Expand all
39 class NET_EXPORT Delegate { 39 class NET_EXPORT Delegate {
40 public: 40 public:
41 // This function may not block and may be called with internal locks held. 41 // This function may not block and may be called with internal locks held.
42 // Thus it must not reenter the TransportSecurityState object. 42 // Thus it must not reenter the TransportSecurityState object.
43 virtual void StateIsDirty(TransportSecurityState* state) = 0; 43 virtual void StateIsDirty(TransportSecurityState* state) = 0;
44 44
45 protected: 45 protected:
46 virtual ~Delegate() {} 46 virtual ~Delegate() {}
47 }; 47 };
48 48
49 // An interface for asynchronously sending HPKP violation reports.
50 class NET_EXPORT ReportSender {
51 public:
52 // Sends the given serialized |report| to |report_uri|.
53 virtual void Send(const GURL& report_uri, const std::string& report) = 0;
54
55 protected:
56 virtual ~ReportSender() {}
57 };
58
49 TransportSecurityState(); 59 TransportSecurityState();
50 ~TransportSecurityState(); 60 ~TransportSecurityState();
51 61
52 // A STSState describes the strict transport security state (required 62 // A STSState describes the strict transport security state (required
53 // upgrade to HTTPS). 63 // upgrade to HTTPS).
54 class NET_EXPORT STSState { 64 class NET_EXPORT STSState {
55 public: 65 public:
56 enum UpgradeMode { 66 enum UpgradeMode {
57 // These numbers must match those in hsts_view.js, function modeToString. 67 // These numbers must match those in hsts_view.js, function modeToString.
58 MODE_FORCE_HTTPS = 0, 68 MODE_FORCE_HTTPS = 0,
(...skipping 294 matching lines...) Expand 10 before | Expand all | Expand 10 after
353 363
354 // True if static pins should be used. 364 // True if static pins should be used.
355 bool enable_static_pins_; 365 bool enable_static_pins_;
356 366
357 DISALLOW_COPY_AND_ASSIGN(TransportSecurityState); 367 DISALLOW_COPY_AND_ASSIGN(TransportSecurityState);
358 }; 368 };
359 369
360 } // namespace net 370 } // namespace net
361 371
362 #endif // NET_HTTP_TRANSPORT_SECURITY_STATE_H_ 372 #endif // NET_HTTP_TRANSPORT_SECURITY_STATE_H_
OLDNEW
« no previous file with comments | « chrome/browser/ssl/chrome_fraudulent_certificate_reporter_unittest.cc ('k') | net/net.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698