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

Side by Side Diff: net/reporting/reporting_delegate.h

Issue 2835923005: Reporting: Remove persistence for now. (Closed)
Patch Set: 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 unified diff | Download patch
« no previous file with comments | « net/reporting/reporting_context.cc ('k') | net/reporting/reporting_delegate.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef NET_REPORTING_REPORTING_DELEGATE_H_
6 #define NET_REPORTING_REPORTING_DELEGATE_H_
7
8 #include <memory>
9
10 #include "base/macros.h"
11 #include "net/base/net_export.h"
12
13 namespace base {
14 class Value;
15 } // namespace base
16
17 namespace net {
18
19 // Delegate for things that the Reporting system can't do by itself, like
20 // persisting data across embedder restarts.
21 class NET_EXPORT ReportingDelegate {
22 public:
23 virtual ~ReportingDelegate();
24
25 // Gets previously persisted data, if any is available. Returns a null pointer
26 // if no data is available. Can be called any number of times.
27 virtual std::unique_ptr<const base::Value> GetPersistedData() = 0;
28
29 // Sets data to be persisted across embedder restarts. Ideally, this data will
30 // be returned by any future calls to GetPersistedData() in this or future
31 // sessions (until newer data is persisted), but no guarantee is made, since
32 // the underlying persistence mechanism may or may not be reliable.
33 virtual void PersistData(
34 std::unique_ptr<const base::Value> persisted_data) = 0;
35
36 protected:
37 ReportingDelegate();
38
39 private:
40 DISALLOW_COPY_AND_ASSIGN(ReportingDelegate);
41 };
42
43 } // namespace net
44
45 #endif // NET_REPORTING_REPORTING_DELEGATE_H_
OLDNEW
« no previous file with comments | « net/reporting/reporting_context.cc ('k') | net/reporting/reporting_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698