Index: components/data_usage/core/data_use.h |
diff --git a/components/data_usage/core/data_use.h b/components/data_usage/core/data_use.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..0dcb5677f30fe9a583e0ee9a9c82e6eaa7bbe205 |
--- /dev/null |
+++ b/components/data_usage/core/data_use.h |
@@ -0,0 +1,40 @@ |
+// Copyright 2015 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#ifndef COMPONENTS_DATA_USAGE_CORE_DATA_USE_H_ |
+#define COMPONENTS_DATA_USAGE_CORE_DATA_USE_H_ |
+ |
+#include <stdint.h> |
+ |
+#include "base/time/time.h" |
+#include "net/base/network_change_notifier.h" |
+#include "url/gurl.h" |
+ |
+namespace data_usage { |
+ |
+struct DataUse { |
+ DataUse(const GURL& url, |
+ const base::Time& request_time, |
+ const GURL& first_party_for_cookies, |
+ 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.
|
+ net::NetworkChangeNotifier::ConnectionType connection_type, |
+ int64_t tx_bytes, |
+ int64_t rx_bytes); |
+ |
+ GURL url; |
+ // The time that the request that is associated with these bytes was started. |
+ base::Time request_time; |
+ GURL first_party_for_cookies; |
+ int tab_id; |
+ net::NetworkChangeNotifier::ConnectionType connection_type; |
+ // TODO(sclittle): Add more network info here, e.g. for Android, SIM operator |
+ // and whether the device is roaming. |
+ |
+ int64_t tx_bytes; |
+ int64_t rx_bytes; |
+}; |
+ |
+} // namespace data_usage |
+ |
+#endif // COMPONENTS_DATA_USAGE_CORE_DATA_USE_H_ |