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_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 int tab_id, | |
bengr
2015/10/06 19:30:28
Perhaps we should use a const std::string& tab_lab
tbansal1
2015/10/06 20:13:15
There is a tab_id field in Chromium
(which is int3
sclittle
2015/10/07 01:07:55
Changed to int32_t according to tbansal's comment.
| |
21 net::NetworkChangeNotifier::ConnectionType connection_type, | |
22 int64_t tx_bytes, | |
23 int64_t rx_bytes); | |
24 | |
25 GURL url; | |
26 // The time that the request that is associated with these bytes was started. | |
27 base::Time request_time; | |
28 GURL first_party_for_cookies; | |
29 int 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_ | |
OLD | NEW |