Index: net/reporting/reporting_service.cc |
diff --git a/net/reporting/reporting_service.cc b/net/reporting/reporting_service.cc |
index 1da91004b540765670dcd0b19e37441bafd6c319..4c85eb07305ac6467a7d5fd8f03770aa242deeb7 100644 |
--- a/net/reporting/reporting_service.cc |
+++ b/net/reporting/reporting_service.cc |
@@ -15,6 +15,7 @@ |
#include "net/reporting/reporting_browsing_data_remover.h" |
#include "net/reporting/reporting_cache.h" |
#include "net/reporting/reporting_context.h" |
+#include "net/reporting/reporting_delegate.h" |
#include "net/reporting/reporting_header_parser.h" |
#include "net/reporting/reporting_persister.h" |
#include "url/gurl.h" |
@@ -34,6 +35,9 @@ class ReportingServiceImpl : public ReportingService { |
const std::string& group, |
const std::string& type, |
std::unique_ptr<const base::Value> body) override { |
+ if (!context_->delegate()->CanQueueReport(url::Origin(url))) |
+ return; |
+ |
context_->cache()->AddReport(url, group, type, std::move(body), |
context_->tick_clock()->NowTicks(), 0); |
} |