Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 syntax = "proto2"; | 5 syntax = "proto2"; |
| 6 | 6 |
| 7 import "timestamp.proto"; | |
| 8 | |
| 7 package precache; | 9 package precache; |
| 8 | 10 |
| 9 // Chrome requires this. | 11 // Chrome requires this. |
| 10 option optimize_for = LITE_RUNTIME; | 12 option optimize_for = LITE_RUNTIME; |
| 11 | 13 |
| 12 // Information about a cacheable resource to be precached. | 14 // Information about a cacheable resource to be precached. |
| 13 message PrecacheResource { | 15 message PrecacheResource { |
| 14 // The URL of the resource. This field must always be present. | 16 // The URL of the resource. This field must always be present. |
| 15 optional string url = 1; | 17 optional string url = 1; |
| 18 | |
| 19 // The tophost this resource corresponds to. | |
| 20 optional string tophostname = 2; | |
|
sclittle
2016/08/11 22:52:36
nit: maybe change to top_host_name?
Raj
2016/08/12 19:04:21
Done.
| |
| 16 }; | 21 }; |
| 17 | 22 |
| 23 message PrecacheManifestId { | |
| 24 // Time at the creation of this manifest. | |
|
sclittle
2016/08/11 22:52:36
What determines this time? The server? If so, then
Raj
2016/08/12 19:04:22
The manifest_id(timestamp) is just an opaque data
| |
| 25 optional Timestamp timestamp = 1; | |
|
sclittle
2016/08/11 22:52:36
Why is this specifically a timestamp? Could this j
Raj
2016/08/12 19:04:22
I will try to change this manifest_id to a simple
| |
| 26 } | |
| 27 | |
| 18 // A manifest of cacheable resources to be precached for a specific host. | 28 // A manifest of cacheable resources to be precached for a specific host. |
| 19 message PrecacheManifest { | 29 message PrecacheManifest { |
| 20 // List of resources that we predict that the user will need if they are | 30 // List of resources that we predict that the user will need if they are |
| 21 // likely to fetch the host. | 31 // likely to fetch the host. |
| 22 repeated PrecacheResource resource = 1; | 32 repeated PrecacheResource resource = 1; |
| 23 | 33 |
| 24 // Experiments running on this manifest. | 34 // Experiments running on this manifest. |
| 25 optional PrecacheExperiments experiments = 2; | 35 optional PrecacheExperiments experiments = 2; |
| 36 | |
| 37 optional PrecacheManifestId id = 3; | |
|
bengr
2016/08/11 18:49:15
Add a comment.
Raj
2016/08/12 19:04:21
Done.
| |
| 26 }; | 38 }; |
| 27 | 39 |
| 28 message PrecacheExperiments { | 40 message PrecacheExperiments { |
| 29 // A mapping between experiment groups and the resources that should be | 41 // A mapping between experiment groups and the resources that should be |
| 30 // considered for the experiment. | 42 // considered for the experiment. |
| 31 map<fixed32, PrecacheResourceSelection> resources_by_experiment_group = 1; | 43 map<fixed32, PrecacheResourceSelection> resources_by_experiment_group = 1; |
| 32 } | 44 } |
| 33 | 45 |
| 34 message PrecacheResourceSelection { | 46 message PrecacheResourceSelection { |
| 35 // Select the resources as a std::bitset over the resources listed in the | 47 // Select the resources as a std::bitset over the resources listed in the |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 68 // resources larger than this will be cancelled. This max applies only to new | 80 // resources larger than this will be cancelled. This max applies only to new |
| 69 // downloads; cached resources are not capped. | 81 // downloads; cached resources are not capped. |
| 70 optional uint64 max_bytes_per_resource = 4 [default = 500000 /* 500 KB */]; | 82 optional uint64 max_bytes_per_resource = 4 [default = 500000 /* 500 KB */]; |
| 71 | 83 |
| 72 // The maximum number of bytes per precache run. While precaching, the total | 84 // The maximum number of bytes per precache run. While precaching, the total |
| 73 // number of bytes used for resources is tallied -- this includes new | 85 // number of bytes used for resources is tallied -- this includes new |
| 74 // downloads as well as cached resources. After this limit is reached, no | 86 // downloads as well as cached resources. After this limit is reached, no |
| 75 // other resources will be downloaded. | 87 // other resources will be downloaded. |
| 76 optional uint64 max_bytes_total = 5 [default = 10000000 /* 10 MB */]; | 88 optional uint64 max_bytes_total = 5 [default = 10000000 /* 10 MB */]; |
| 77 }; | 89 }; |
| OLD | NEW |