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

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

Issue 2689953004: Reporting: Implement header parser. (Closed)
Patch Set: Extract header parser and make static Created 3 years, 9 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/BUILD.gn ('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
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef NET_REPORTING_REPORTING_HEADER_PARSER_H_
6 #define NET_REPORTING_REPORTING_HEADER_PARSER_H_
7
8 #include <string>
9
10 #include "base/macros.h"
11 #include "base/time/time.h"
12 #include "net/base/net_export.h"
13 #include "url/gurl.h"
14
15 namespace base {
16 class Value;
17 } // namespace base
18
19 namespace net {
20
21 class ReportingCache;
22
23 class NET_EXPORT ReportingHeaderParser {
shivanisha 2017/03/15 23:38:01 class documentation.
Julia Tuttle 2017/03/21 18:52:33 Done.
24 public:
25 static void ParseHeader(ReportingCache* cache,
shivanisha 2017/03/15 23:38:01 API documentation
Julia Tuttle 2017/03/21 18:52:33 Done.
26 base::TimeTicks now,
27 const GURL& url,
28 const std::string& json_value);
29
30 private:
31 // Processes a single endpoint's parsed value from the Report-To header(s).
32 // Creates, updates, or removes a client in the cache as needed.
33 //
34 // |url| is the URL that the header came from.
35 //
36 // |value| is the parsed value.
37 static void ProcessEndpoint(ReportingCache* cache,
38 base::TimeTicks now,
shivanisha 2017/03/15 23:38:01 How is this function different from ReportingDeleg
Julia Tuttle 2017/03/21 18:52:33 It's similar; I just chose to break out the header
39 const GURL& url,
40 const base::Value& value);
41
42 DISALLOW_IMPLICIT_CONSTRUCTORS(ReportingHeaderParser);
43 };
44
45 } // namespace net
46
47 #endif // NET_REPORTING_REPORTING_HEADER_PARSER_H_
OLDNEW
« no previous file with comments | « net/BUILD.gn ('k') | net/reporting/reporting_header_parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698