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

Unified Diff: net/reporting/reporting_delegate.cc

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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/reporting/reporting_delegate.h ('k') | net/reporting/reporting_delivery_agent.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/reporting/reporting_delegate.cc
diff --git a/net/reporting/reporting_delegate.cc b/net/reporting/reporting_delegate.cc
new file mode 100644
index 0000000000000000000000000000000000000000..88ff9139707a5e4d5af36b4dda7f2dc2a4c51891
--- /dev/null
+++ b/net/reporting/reporting_delegate.cc
@@ -0,0 +1,43 @@
+// Copyright 2017 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "net/reporting/reporting_delegate.h"
+
+#include "base/memory/ptr_util.h"
+
+namespace net {
+
+namespace {
+
+class ReportingDelegateImpl : public ReportingDelegate {
+ public:
+ ReportingDelegateImpl() {}
+
+ ~ReportingDelegateImpl() override {}
+
+ bool CanQueueReport(const url::Origin& origin) const override { return true; }
+
+ bool CanSendReport(const url::Origin& origin) const override { return true; }
+
+ bool CanSetClient(const url::Origin& origin,
+ const GURL& endpoint) const override {
+ return true;
+ }
+
+ bool CanUseClient(const url::Origin& origin,
+ const GURL& endpoint) const override {
+ return true;
+ }
+};
+
+} // namespace
+
+// static
+std::unique_ptr<ReportingDelegate> ReportingDelegate::Create() {
+ return base::MakeUnique<ReportingDelegateImpl>();
+}
+
+ReportingDelegate::~ReportingDelegate() {}
+
+} // namespace net
« no previous file with comments | « net/reporting/reporting_delegate.h ('k') | net/reporting/reporting_delivery_agent.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698