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

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

Issue 1373373002: Create component to expose network usage stats to consumers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed nits Created 5 years, 2 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 | « components/data_usage/core/DEPS ('k') | components/data_usage/core/data_use.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 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_H_
6 #define COMPONENTS_DATA_USAGE_CORE_DATA_USE_H_
7
8 #include <stdint.h>
9
10 #include "base/time/time.h"
11 #include "net/base/network_change_notifier.h"
12 #include "url/gurl.h"
13
14 namespace data_usage {
15
16 struct DataUse {
17 DataUse(const GURL& url,
18 const base::Time& request_time,
19 const GURL& first_party_for_cookies,
20 int32_t tab_id,
21 net::NetworkChangeNotifier::ConnectionType connection_type,
22 int64_t tx_bytes,
23 int64_t rx_bytes);
24
25 GURL url;
26 // The time when the request that is associated with these bytes was started.
27 base::Time request_time;
28 GURL first_party_for_cookies;
29 int32_t tab_id;
30 net::NetworkChangeNotifier::ConnectionType connection_type;
31 // TODO(sclittle): Add more network info here, e.g. for Android, SIM operator
32 // and whether the device is roaming.
33
34 int64_t tx_bytes;
35 int64_t rx_bytes;
36 };
37
38 } // namespace data_usage
39
40 #endif // COMPONENTS_DATA_USAGE_CORE_DATA_USE_H_
OLDNEW
« no previous file with comments | « components/data_usage/core/DEPS ('k') | components/data_usage/core/data_use.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698