OLD | NEW |
---|---|
(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_ | |
OLD | NEW |