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

Side by Side Diff: components/data_usage/core/data_use_annotator.h

Issue 1421983002: Include tab IDs when reporting data use accounting. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@data_use_scoped_vector
Patch Set: Fixed external_data_use_observer test Created 5 years, 1 month 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
OLDNEW
(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.h"
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 typedef base::Callback<void(scoped_ptr<DataUse>)> DataUseConsumerCallback;
24
25 virtual ~DataUseAnnotator() {}
26
27 // Annotate |data_use| with additional information, possibly from |request|,
28 // before passing the annotated |data_use| to |callback|. |request| is passed
29 // in as a non-const pointer so that the DataUseAnnotator can add UserData on
30 // to the |request| if desired.
31 virtual void Annotate(net::URLRequest* request,
32 scoped_ptr<DataUse> data_use,
33 const DataUseConsumerCallback& callback) = 0;
34 };
35
36 } // namespace data_usage
37
38 #endif // COMPONENTS_DATA_USAGE_CORE_DATA_USE_ANNOTATOR_H_
OLDNEW
« no previous file with comments | « components/data_usage/core/data_use_aggregator_unittest.cc ('k') | net/base/layered_network_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698