| 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 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 <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <map> | 10 #include <map> |
| (...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 255 public: | 255 public: |
| 256 // Sends the given serialized |report| to |report_uri| with | 256 // Sends the given serialized |report| to |report_uri| with |
| 257 // Content-Type header as specified in | 257 // Content-Type header as specified in |
| 258 // |content_type|. |content_type| should be non-empty. | 258 // |content_type|. |content_type| should be non-empty. |
| 259 // |report_id| could be any non-negative integer. It's passed back to the | 259 // |report_id| could be any non-negative integer. It's passed back to the |
| 260 // error or success callbacks. | 260 // error or success callbacks. |
| 261 virtual void Send( | 261 virtual void Send( |
| 262 const GURL& report_uri, | 262 const GURL& report_uri, |
| 263 base::StringPiece content_type, | 263 base::StringPiece content_type, |
| 264 base::StringPiece report, | 264 base::StringPiece report, |
| 265 const base::Callback<void()>& success_callback, | 265 const base::Callback<void(int /* response_code */)>& success_callback, |
| 266 const base::Callback<void(const GURL&, int)>& error_callback) = 0; | 266 const base::Callback< |
| 267 void(const GURL&, int /* net_error */, int /* response_code */)>& |
| 268 error_callback) = 0; |
| 267 | 269 |
| 268 protected: | 270 protected: |
| 269 virtual ~ReportSenderInterface() {} | 271 virtual ~ReportSenderInterface() {} |
| 270 }; | 272 }; |
| 271 | 273 |
| 272 // An interface for building and asynchronously sending reports when a | 274 // An interface for building and asynchronously sending reports when a |
| 273 // site expects valid Certificate Transparency information but it | 275 // site expects valid Certificate Transparency information but it |
| 274 // wasn't supplied. | 276 // wasn't supplied. |
| 275 class NET_EXPORT ExpectCTReporter { | 277 class NET_EXPORT ExpectCTReporter { |
| 276 public: | 278 public: |
| (...skipping 321 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 598 // rate-limiting. | 600 // rate-limiting. |
| 599 ExpiringCache<std::string, bool, base::TimeTicks, std::less<base::TimeTicks>> | 601 ExpiringCache<std::string, bool, base::TimeTicks, std::less<base::TimeTicks>> |
| 600 sent_reports_cache_; | 602 sent_reports_cache_; |
| 601 | 603 |
| 602 DISALLOW_COPY_AND_ASSIGN(TransportSecurityState); | 604 DISALLOW_COPY_AND_ASSIGN(TransportSecurityState); |
| 603 }; | 605 }; |
| 604 | 606 |
| 605 } // namespace net | 607 } // namespace net |
| 606 | 608 |
| 607 #endif // NET_HTTP_TRANSPORT_SECURITY_STATE_H_ | 609 #endif // NET_HTTP_TRANSPORT_SECURITY_STATE_H_ |
| OLD | NEW |