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

Unified Diff: chrome/browser/net/chrome_network_delegate.cc

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 | « chrome/browser/net/chrome_network_delegate.h ('k') | net/base/layered_network_delegate.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/net/chrome_network_delegate.cc
diff --git a/chrome/browser/net/chrome_network_delegate.cc b/chrome/browser/net/chrome_network_delegate.cc
index 84a4eb8a15a787786144526472125245c235c91f..3c363afaa6391dfe904caa418b266fed5bd2bd6e 100644
--- a/chrome/browser/net/chrome_network_delegate.cc
+++ b/chrome/browser/net/chrome_network_delegate.cc
@@ -546,6 +546,42 @@ bool ChromeNetworkDelegate::OnCancelURLRequestWithPolicyViolatingReferrerHeader(
return true;
}
+bool ChromeNetworkDelegate::OnCanQueueReportingReport(
+ const url::Origin& origin) const {
+ if (!cookie_settings_)
+ return true;
+
+ return cookie_settings_->IsCookieAccessAllowed(origin.GetURL(),
+ origin.GetURL());
+}
+
+bool ChromeNetworkDelegate::OnCanSendReportingReport(
+ const url::Origin& origin) const {
+ if (!cookie_settings_)
+ return true;
+
+ return cookie_settings_->IsCookieAccessAllowed(origin.GetURL(),
+ origin.GetURL());
+}
+
+bool ChromeNetworkDelegate::OnCanSetReportingClient(
+ const url::Origin& origin,
+ const GURL& endpoint) const {
+ if (!cookie_settings_)
+ return true;
+
+ return cookie_settings_->IsCookieAccessAllowed(endpoint, origin.GetURL());
+}
+
+bool ChromeNetworkDelegate::OnCanUseReportingClient(
+ const url::Origin& origin,
+ const GURL& endpoint) const {
+ if (!cookie_settings_)
+ return true;
+
+ return cookie_settings_->IsCookieAccessAllowed(endpoint, origin.GetURL());
+}
+
void ChromeNetworkDelegate::ReportDataUsageStats(net::URLRequest* request,
int64_t tx_bytes,
int64_t rx_bytes) {
« no previous file with comments | « chrome/browser/net/chrome_network_delegate.h ('k') | net/base/layered_network_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698