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

Unified Diff: net/reporting/reporting_network_change_observer.h

Issue 2813103005: Reporting: Observe network changes and clear reports/clients (Closed)
Patch Set: Make requested changes. Created 3 years, 8 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_context.cc ('k') | net/reporting/reporting_network_change_observer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/reporting/reporting_network_change_observer.h
diff --git a/net/reporting/reporting_network_change_observer.h b/net/reporting/reporting_network_change_observer.h
new file mode 100644
index 0000000000000000000000000000000000000000..941133d339ef7a31fa8187f6997420b593e71e54
--- /dev/null
+++ b/net/reporting/reporting_network_change_observer.h
@@ -0,0 +1,29 @@
+// 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_NETWORK_CHANGE_OBSERVER_H_
+#define NET_REPORTING_REPORTING_NETWORK_CHANGE_OBSERVER_H_
+
+#include <memory>
+
+#include "net/base/net_export.h"
+
+namespace net {
+
+class ReportingContext;
+
+// Clears queued reports and/or configured endpoints on network changes if
+// enabled in ReportingPolicy.
+class NET_EXPORT ReportingNetworkChangeObserver {
+ public:
+ // Creates a ReportingNetworkChangeObserver. |context| must outlive it.
+ static std::unique_ptr<ReportingNetworkChangeObserver> Create(
+ ReportingContext* context);
+
+ virtual ~ReportingNetworkChangeObserver();
+};
+
+} // namespace net
+
+#endif // NET_REPORTING_REPORTING_NETWORK_CHANGE_OBSERVER_H_
« no previous file with comments | « net/reporting/reporting_context.cc ('k') | net/reporting/reporting_network_change_observer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698