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

Side by Side Diff: net/reporting/reporting_delegate.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_context.cc ('k') | net/reporting/reporting_delegate.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_DELEGATE_H_
6 #define NET_REPORTING_REPORTING_DELEGATE_H_
7
8 #include <memory>
9
10 #include "base/macros.h"
11 #include "net/base/net_export.h"
12
13 class GURL;
14
15 namespace url {
16 class Origin;
17 } // namespace url
18
19 namespace net {
20
21 class NET_EXPORT ReportingDelegate {
22 public:
23 virtual ~ReportingDelegate();
24
25 // Checks whether |origin| is allowed to queue reports for future delivery.
26 virtual bool CanQueueReport(const url::Origin& origin) const = 0;
27
28 // Checks whether |origin| is allowed to receive reports, either in real time
29 // or that were queued earlier.
30 virtual bool CanSendReport(const url::Origin& origin) const = 0;
31
32 // Checks whether |origin| can set |endpoint| to be used for future report
33 // deliveries.
34 virtual bool CanSetClient(const url::Origin& origin,
35 const GURL& endpoint) const = 0;
36
37 // Checks whether |origin| can use |endpoint| for a report delivery right now.
38 virtual bool CanUseClient(const url::Origin& origin,
39 const GURL& endpoint) const = 0;
40
41 static std::unique_ptr<ReportingDelegate> Create();
42 };
43
44 } // namespace net
45
46 #endif // NET_REPORTING_REPORTING_DELEGATE_H_
OLDNEW
« no previous file with comments | « net/reporting/reporting_context.cc ('k') | net/reporting/reporting_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698