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_SERVICE_H_ | |
6 #define NET_REPORTING_REPORTING_SERVICE_H_ | |
7 | |
8 #include <memory> | |
9 #include <string> | |
10 | |
11 #include "base/callback.h" | |
12 #include "base/macros.h" | |
13 #include "net/base/net_export.h" | |
14 | |
15 class GURL; | |
16 | |
17 namespace base { | |
18 class Value; | |
19 } // namespace | |
20 | |
21 namespace net { | |
22 | |
23 class ReportingContext; | |
24 class ReportingDelegate; | |
25 struct ReportingPolicy; | |
26 class URLRequestContext; | |
27 | |
28 class NET_EXPORT ReportingService { | |
shivanisha
2017/04/04 17:52:43
Comment describing the overall purpose of the clas
Julia Tuttle
2017/04/04 18:37:16
Done.
| |
29 public: | |
30 virtual ~ReportingService(); | |
31 | |
32 static std::unique_ptr<ReportingService> Create( | |
33 const ReportingPolicy& policy, | |
34 URLRequestContext* request_context, | |
35 std::unique_ptr<ReportingDelegate> delegate); | |
shivanisha
2017/04/04 17:52:43
Comment describing the arguments.
Julia Tuttle
2017/04/04 18:37:16
Done.
| |
36 | |
37 static std::unique_ptr<ReportingService> CreateForTesting( | |
38 std::unique_ptr<ReportingContext> reporting_context); | |
39 | |
40 virtual void QueueReport(const GURL& url, | |
41 const std::string& group, | |
42 const std::string& type, | |
43 std::unique_ptr<const base::Value> body) = 0; | |
44 | |
45 virtual void ProcessHeader(const GURL& url, | |
46 const std::string& header_value) = 0; | |
47 | |
48 virtual void RemoveBrowsingData( | |
49 bool remove_reports, | |
50 bool remove_clients, | |
51 base::Callback<bool(const GURL&)> origin_filter) = 0; | |
shivanisha
2017/04/04 17:52:43
Comments for all of the above APIs.
Julia Tuttle
2017/04/04 18:37:16
Done.
| |
52 | |
53 protected: | |
54 ReportingService() {} | |
55 | |
56 private: | |
57 DISALLOW_COPY_AND_ASSIGN(ReportingService); | |
58 }; | |
59 | |
60 } // namespace net | |
61 | |
62 #endif // NET_REPORTING_REPORTING_SERVICE_H_ | |
OLD | NEW |