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

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

Issue 2365353004: Add Content-Type header to net::ReportSender reports (Closed)
Patch Set: update some unit test subclasses Created 4 years, 2 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 (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 231 matching lines...) Expand 10 before | Expand all | Expand 10 after
242 // The domain which matched during a search for this Expect-Staple entry 242 // The domain which matched during a search for this Expect-Staple entry
243 std::string domain; 243 std::string domain;
244 244
245 // The URI reports are sent to if a valid OCSP response is not stapled 245 // The URI reports are sent to if a valid OCSP response is not stapled
246 GURL report_uri; 246 GURL report_uri;
247 247
248 // True if subdomains are subject to this policy 248 // True if subdomains are subject to this policy
249 bool include_subdomains; 249 bool include_subdomains;
250 }; 250 };
251 251
252 // An interface for asynchronously sending HPKP violation reports. 252 // An interface for asynchronously sending reports of domain security
253 // policy violations that TransportSecurityState observes.
253 class NET_EXPORT ReportSenderInterface { 254 class NET_EXPORT ReportSenderInterface {
254 public: 255 public:
255 // Sends the given serialized |report| to |report_uri|. 256 // Sends the given serialized |report| to |report_uri|.
256 virtual void Send(const GURL& report_uri, const std::string& report) = 0; 257 virtual void Send(const GURL& report_uri, const std::string& report) = 0;
257 258
259 // Sets a Content-Type header to be sent on outgoing reports.
260 virtual void SetContentTypeHeader(const std::string& content_type) = 0;
eroman 2016/09/26 18:37:24 API question: Why not make this a parameter of the
estark 2016/09/26 18:38:45 There are other users of this class that don't car
eroman 2016/09/26 18:55:11 I think it would be clearer for Send() to capture
261
258 // Sets a callback to be called when report sending fails. 262 // Sets a callback to be called when report sending fails.
259 virtual void SetErrorCallback( 263 virtual void SetErrorCallback(
260 const base::Callback<void(const GURL&, int)>& error_callback) = 0; 264 const base::Callback<void(const GURL&, int)>& error_callback) = 0;
261 265
262 protected: 266 protected:
263 virtual ~ReportSenderInterface() {} 267 virtual ~ReportSenderInterface() {}
264 }; 268 };
265 269
266 // An interface for building and asynchronously sending reports when a 270 // An interface for building and asynchronously sending reports when a
267 // site expects valid Certificate Transparency information but it 271 // site expects valid Certificate Transparency information but it
(...skipping 321 matching lines...) Expand 10 before | Expand all | Expand 10 after
589 // rate-limiting. 593 // rate-limiting.
590 ExpiringCache<std::string, bool, base::TimeTicks, std::less<base::TimeTicks>> 594 ExpiringCache<std::string, bool, base::TimeTicks, std::less<base::TimeTicks>>
591 sent_reports_cache_; 595 sent_reports_cache_;
592 596
593 DISALLOW_COPY_AND_ASSIGN(TransportSecurityState); 597 DISALLOW_COPY_AND_ASSIGN(TransportSecurityState);
594 }; 598 };
595 599
596 } // namespace net 600 } // namespace net
597 601
598 #endif // NET_HTTP_TRANSPORT_SECURITY_STATE_H_ 602 #endif // NET_HTTP_TRANSPORT_SECURITY_STATE_H_
OLDNEW
« no previous file with comments | « chrome/browser/ssl/chrome_expect_ct_reporter_unittest.cc ('k') | net/http/transport_security_state.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698