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

Side by Side Diff: net/reporting/reporting_header_parser.h

Issue 2889193002: Reporting: Add ReportingDelegate to check site permissions (Closed)
Patch Set: rebase, tweak, format Created 3 years, 7 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 | « net/reporting/reporting_endpoint_manager.cc ('k') | net/reporting/reporting_header_parser.cc » ('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 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 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_REPORTING_REPORTING_HEADER_PARSER_H_ 5 #ifndef NET_REPORTING_REPORTING_HEADER_PARSER_H_
6 #define NET_REPORTING_REPORTING_HEADER_PARSER_H_ 6 #define NET_REPORTING_REPORTING_HEADER_PARSER_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
11 #include "base/time/time.h"
12 #include "net/base/net_export.h" 11 #include "net/base/net_export.h"
13 12
14 class GURL; 13 class GURL;
15 14
16 namespace base {
17 class Value;
18 } // namespace base
19
20 namespace net { 15 namespace net {
21 16
22 class ReportingCache;
23 class ReportingContext; 17 class ReportingContext;
24 18
25 class NET_EXPORT ReportingHeaderParser { 19 class NET_EXPORT ReportingHeaderParser {
26 public: 20 public:
27 static void ParseHeader(ReportingContext* context, 21 static void ParseHeader(ReportingContext* context,
28 const GURL& url, 22 const GURL& url,
29 const std::string& json_value); 23 const std::string& json_value);
30 24
31 private: 25 private:
32 // Processes a single endpoint's parsed value from the Report-To header(s).
33 // Creates, updates, or removes a client in the cache as needed.
34 //
35 // |url| is the URL that the header came from.
36 //
37 // |value| is the parsed value.
38 static void ProcessEndpoint(ReportingCache* cache,
39 base::TimeTicks now,
40 const GURL& url,
41 const base::Value& value);
42
43 DISALLOW_IMPLICIT_CONSTRUCTORS(ReportingHeaderParser); 26 DISALLOW_IMPLICIT_CONSTRUCTORS(ReportingHeaderParser);
44 }; 27 };
45 28
46 } // namespace net 29 } // namespace net
47 30
48 #endif // NET_REPORTING_REPORTING_HEADER_PARSER_H_ 31 #endif // NET_REPORTING_REPORTING_HEADER_PARSER_H_
OLDNEW
« no previous file with comments | « net/reporting/reporting_endpoint_manager.cc ('k') | net/reporting/reporting_header_parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698