| 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 package precache; | 7 package precache; |
| 8 | 8 |
| 9 // Chrome requires this. | 9 // Chrome requires this. |
| 10 option optimize_for = LITE_RUNTIME; | 10 option optimize_for = LITE_RUNTIME; |
| 11 | 11 |
| 12 // Information about a cacheable resource to be precached. | 12 // Information about a cacheable resource to be precached. |
| 13 message PrecacheResource { | 13 message PrecacheResource { |
| 14 // The URL of the resource. This field must always be present. | 14 // The URL of the resource. This field must always be present. |
| 15 optional string url = 1; | 15 optional string url = 1; |
| 16 | 16 |
| 17 // The tophost this resource corresponds to. | 17 // The tophost this resource corresponds to. |
| 18 optional string top_host_name = 2; | 18 optional string top_host_name = 2; |
| 19 |
| 20 // How important this resource is for the host. It ranges from 0.0 to 1.0. |
| 21 // Higher values mean more important. |
| 22 optional double weight_ratio = 3; |
| 19 }; | 23 }; |
| 20 | 24 |
| 21 message PrecacheManifestId { | 25 message PrecacheManifestId { |
| 22 optional int64 id = 1; | 26 optional int64 id = 1; |
| 23 }; | 27 }; |
| 24 | 28 |
| 25 // A manifest of cacheable resources to be precached for a specific host. | 29 // A manifest of cacheable resources to be precached for a specific host. |
| 26 message PrecacheManifest { | 30 message PrecacheManifest { |
| 27 // List of resources that we predict that the user will need if they are | 31 // List of resources that we predict that the user will need if they are |
| 28 // likely to fetch the host. | 32 // likely to fetch the host. |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 82 // The maximum number of bytes per precache run. While precaching, the total | 86 // The maximum number of bytes per precache run. While precaching, the total |
| 83 // number of bytes used for resources is tallied -- this includes new | 87 // number of bytes used for resources is tallied -- this includes new |
| 84 // downloads as well as cached resources. After this limit is reached, no | 88 // downloads as well as cached resources. After this limit is reached, no |
| 85 // other resources will be downloaded. | 89 // other resources will be downloaded. |
| 86 optional uint64 max_bytes_total = 5 [default = 10000000 /* 10 MB */]; | 90 optional uint64 max_bytes_total = 5 [default = 10000000 /* 10 MB */]; |
| 87 | 91 |
| 88 // The maximum number of bytes that can be fetched by precache on a single | 92 // The maximum number of bytes that can be fetched by precache on a single |
| 89 // day. After this limit is reached, no more resources will be downloaded, | 93 // day. After this limit is reached, no more resources will be downloaded, |
| 90 // until the quota gets replenished the next day. | 94 // until the quota gets replenished the next day. |
| 91 optional uint64 daily_quota_total = 6 [default = 40000000 /* 10 MB */]; | 95 optional uint64 daily_quota_total = 6 [default = 40000000 /* 10 MB */]; |
| 96 |
| 97 // The number of resources to fetch per precache run. Only the first |
| 98 // |total_resources_count| resource URLs are fetched. |
| 99 optional uint32 total_resources_count = 7 [default = 999999]; |
| 100 |
| 101 // The minimum visit-adjusted weight for which a resource will be downloaded. |
| 102 optional double min_weight = 8 [default = 0]; |
| 103 |
| 104 // Whether to sort resources by weight, descending, before fetching. This |
| 105 // affects the fetcher's behavior with respect to max_bytes_total and |
| 106 // total_resources_count. |
| 107 optional bool global_ranking = 9 [default = false]; |
| 92 }; | 108 }; |
| OLD | NEW |