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

Unified Diff: net/reporting/reporting_delegate_impl.h

Issue 2689953004: Reporting: Implement header parser. (Closed)
Patch Set: Finish DelegateImpl implementation Created 3 years, 10 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
Index: net/reporting/reporting_delegate_impl.h
diff --git a/net/reporting/reporting_delegate_impl.h b/net/reporting/reporting_delegate_impl.h
new file mode 100644
index 0000000000000000000000000000000000000000..1f51ea5539103615a97547d1c8b4450bf450ddeb
--- /dev/null
+++ b/net/reporting/reporting_delegate_impl.h
@@ -0,0 +1,38 @@
+// 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.
+
+#ifndef NET_REPORTING_REPORTING_DELEGATE_IMPL_H_
+#define NET_REPORTING_REPORTING_DELEGATE_IMPL_H_
+
+#include "base/time/tick_clock.h"
+#include "net/base/net_export.h"
+#include "net/reporting/reporting_delegate.h"
+
+namespace net {
+
+class ReportingCache;
+
+class NET_EXPORT ReportingDelegateImpl : public ReportingDelegate {
+ public:
+ ReportingDelegateImpl(base::TickClock* clock, ReportingCache* cache);
+
+ ~ReportingDelegateImpl() override;
+
+ void OnReportGenerated(const GURL& url,
+ const std::string& type,
+ const std::string& group,
+ std::unique_ptr<const base::Value> body) override;
+
+ void OnHeaderReceived(const GURL& url, const std::string& value) override;
+
+ private:
+ void ProcessEndpoint(const GURL& url, const base::Value* json);
shivanisha 2017/03/01 21:51:57 Comment to describe the purpose of ProcessEndpoint
Julia Tuttle 2017/03/06 17:57:51 Done.
+
+ base::TickClock* clock_;
+ ReportingCache* cache_;
+};
+
+} // namespace net
+
+#endif // NET_REPORTING_REPORTING_DELEGATE_IMPL_H_

Powered by Google App Engine
This is Rietveld 408576698