Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / components / data_reduction_proxy / proto / data_store.proto
blob4bfdc39db3ffef334cc4b7ea013db54f0785218b
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 // Protocol buffer definitions for Data Reduction Proxy data stored in LevelDB.
7 syntax = "proto2";
9 option optimize_for = LITE_RUNTIME;
11 package data_reduction_proxy;
13 enum ConnectionType {
14   CONNECTION_UNKNOWN = 0;
15   CONNECTION_ETHERNET = 1;
16   CONNECTION_WIFI = 2;
17   CONNECTION_2G = 3;
18   CONNECTION_3G = 4;
19   CONNECTION_4G = 5;
20   CONNECTION_BLUETOOTH = 6;
23 // Contains data usage for an interval of time.
24 message DataUsageBucket {
25   repeated PerConnectionDataUsage connection_usage = 1;
27   // Timestamp of the last update that was included in this bucket.
28   optional int64 last_updated_timestamp = 2;
31 message PerConnectionDataUsage {
32   repeated PerSiteDataUsage site_usage = 1;
35 // Data usage for a specific site.
36 message PerSiteDataUsage {
37   // Full hostname of the site without scheme, port, and trailing slashes.
38   // Eg: For page "http://www.finance.google.com/index.html?a=b", hostname will
39   // be "www.finance.google.com".
40   required string hostname = 1;
42   // Total data used in bytes when browsing this site.
43   required int64 data_used = 2;
45   // Amount of data that would have been used to browse this site without
46   // employing any data saving techniques.
47   required int64 original_size = 3;