| 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 272 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 283 public: | 283 public: |
| 284 // Sends the given serialized |report| to |report_uri| with | 284 // Sends the given serialized |report| to |report_uri| with |
| 285 // Content-Type header as specified in | 285 // Content-Type header as specified in |
| 286 // |content_type|. |content_type| should be non-empty. | 286 // |content_type|. |content_type| should be non-empty. |
| 287 // |report_id| could be any non-negative integer. It's passed back to the | 287 // |report_id| could be any non-negative integer. It's passed back to the |
| 288 // error or success callbacks. | 288 // error or success callbacks. |
| 289 virtual void Send( | 289 virtual void Send( |
| 290 const GURL& report_uri, | 290 const GURL& report_uri, |
| 291 base::StringPiece content_type, | 291 base::StringPiece content_type, |
| 292 base::StringPiece report, | 292 base::StringPiece report, |
| 293 const base::Callback<void()>& success_callback, | 293 const base::Callback<void(int /* response_code */)>& success_callback, |
| 294 const base::Callback<void(const GURL&, int)>& error_callback) = 0; | 294 const base::Callback<void(const GURL&, int /* net_error */)>& |
| 295 error_callback) = 0; |
| 295 | 296 |
| 296 protected: | 297 protected: |
| 297 virtual ~ReportSenderInterface() {} | 298 virtual ~ReportSenderInterface() {} |
| 298 }; | 299 }; |
| 299 | 300 |
| 300 // An interface for building and asynchronously sending reports when a | 301 // An interface for building and asynchronously sending reports when a |
| 301 // site expects valid Certificate Transparency information but it | 302 // site expects valid Certificate Transparency information but it |
| 302 // wasn't supplied. | 303 // wasn't supplied. |
| 303 class NET_EXPORT ExpectCTReporter { | 304 class NET_EXPORT ExpectCTReporter { |
| 304 public: | 305 public: |
| (...skipping 343 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 648 // rate-limiting. | 649 // rate-limiting. |
| 649 ExpiringCache<std::string, bool, base::TimeTicks, std::less<base::TimeTicks>> | 650 ExpiringCache<std::string, bool, base::TimeTicks, std::less<base::TimeTicks>> |
| 650 sent_reports_cache_; | 651 sent_reports_cache_; |
| 651 | 652 |
| 652 DISALLOW_COPY_AND_ASSIGN(TransportSecurityState); | 653 DISALLOW_COPY_AND_ASSIGN(TransportSecurityState); |
| 653 }; | 654 }; |
| 654 | 655 |
| 655 } // namespace net | 656 } // namespace net |
| 656 | 657 |
| 657 #endif // NET_HTTP_TRANSPORT_SECURITY_STATE_H_ | 658 #endif // NET_HTTP_TRANSPORT_SECURITY_STATE_H_ |
| OLD | NEW |