OLD | NEW |
---|---|
(Empty) | |
1 // Copyright 2015 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 COMPONENTS_DATA_USAGE_CORE_DATA_USE_ANNOTATOR_H_ | |
6 #define COMPONENTS_DATA_USAGE_CORE_DATA_USE_ANNOTATOR_H_ | |
7 | |
8 #include "base/callback_forward.h" | |
bengr
2015/11/05 00:00:38
Why do you need callback_forward.h and not callbac
sclittle
2015/11/05 01:22:48
We do need it now, because of the new typedef here
| |
9 #include "base/memory/scoped_ptr.h" | |
10 | |
11 namespace net { | |
12 class URLRequest; | |
13 } | |
14 | |
15 namespace data_usage { | |
16 | |
17 struct DataUse; | |
18 | |
19 // Interface for an object that can annotate DataUse objects with additional | |
20 // information. | |
21 class DataUseAnnotator { | |
22 public: | |
23 virtual ~DataUseAnnotator() {} | |
24 | |
25 // Annotate |data_use| with additional information, possibly from |request|, | |
26 // before passing the annotated |data_use| to |callback|. |request| is passed | |
27 // in as a non-const pointer so that the DataUseAnnotator can add UserData on | |
28 // to the |request| if desired. | |
29 virtual void Annotate( | |
30 net::URLRequest* request, | |
31 scoped_ptr<DataUse> data_use, | |
32 const base::Callback<void(scoped_ptr<DataUse>)>& callback) = 0; | |
33 }; | |
34 | |
35 } // namespace data_usage | |
36 | |
37 #endif // COMPONENTS_DATA_USAGE_CORE_DATA_USE_ANNOTATOR_H_ | |
OLD | NEW |