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

Unified Diff: net/base/network_delegate.h

Issue 2891133003: Reporting: Wire ReportingDelegate into ChromeNetworkDelegate (Closed)
Patch Set: 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/base/layered_network_delegate_unittest.cc ('k') | net/base/network_delegate.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/base/network_delegate.h
diff --git a/net/base/network_delegate.h b/net/base/network_delegate.h
index f602f3c26b42f2192ac8f118154c73d14258813d..eaa1e3061c643c8bf4db58d8c9c83cad511e5701 100644
--- a/net/base/network_delegate.h
+++ b/net/base/network_delegate.h
@@ -24,6 +24,10 @@ namespace base {
class FilePath;
}
+namespace url {
+class Origin;
+}
+
namespace net {
// NOTE: Layering violations!
@@ -112,6 +116,13 @@ class NET_EXPORT NetworkDelegate : public base::NonThreadSafe {
const GURL& target_url,
const GURL& referrer_url) const;
+ bool CanQueueReportingReport(const url::Origin& origin) const;
+ bool CanSendReportingReport(const url::Origin& origin) const;
+ bool CanSetReportingClient(const url::Origin& origin,
+ const GURL& endpoint) const;
+ bool CanUseReportingClient(const url::Origin& origin,
+ const GURL& endpoint) const;
+
private:
// This is the interface for subclasses of NetworkDelegate to implement. These
// member functions will be called by the respective public notification
@@ -292,6 +303,16 @@ class NET_EXPORT NetworkDelegate : public base::NonThreadSafe {
const URLRequest& request,
const GURL& target_url,
const GURL& referrer_url) const = 0;
+
+ virtual bool OnCanQueueReportingReport(const url::Origin& origin) const = 0;
+
+ virtual bool OnCanSendReportingReport(const url::Origin& origin) const = 0;
+
+ virtual bool OnCanSetReportingClient(const url::Origin& origin,
+ const GURL& endpoint) const = 0;
+
+ virtual bool OnCanUseReportingClient(const url::Origin& origin,
+ const GURL& endpoint) const = 0;
};
} // namespace net
« no previous file with comments | « net/base/layered_network_delegate_unittest.cc ('k') | net/base/network_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698