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; |
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
102 optional double min_weight = 8 [default = 0]; | 102 optional double min_weight = 8 [default = 0]; |
103 | 103 |
104 // Whether to sort resources by weight, descending, before fetching. This | 104 // Whether to sort resources by weight, descending, before fetching. This |
105 // affects the fetcher's behavior with respect to max_bytes_total and | 105 // affects the fetcher's behavior with respect to max_bytes_total and |
106 // total_resources_count. | 106 // total_resources_count. |
107 optional bool global_ranking = 9 [default = false]; | 107 optional bool global_ranking = 9 [default = false]; |
108 | 108 |
109 // If true, resource fetches are only made over the network for a given URL if | 109 // If true, resource fetches are only made over the network for a given URL if |
110 // an existing cache entry exists and has revalidation headers. | 110 // an existing cache entry exists and has revalidation headers. |
111 optional bool revalidation_only = 10 [default = false]; | 111 optional bool revalidation_only = 10 [default = false]; |
| 112 |
| 113 // The function to use to combine a resource's weight_ratio with its |
| 114 // referring manifest's host_visits count to produce a final score. |
| 115 enum ResourceWeightFunction { |
| 116 // Models the expected number of requests for the resource in the next 30 |
| 117 // days, given that weight_ratio is a probability that a visit to the host |
| 118 // will request a resource, and host_visits is an estimate of the number of |
| 119 // visits to the host in the next 30 days. |
| 120 FUNCTION_NAIVE = 0; |
| 121 // Models the probability of at least one request, given the same. |
| 122 FUNCTION_GEOMETRIC = 1; |
| 123 }; |
| 124 optional ResourceWeightFunction resource_weight_function = 11 |
| 125 [default = FUNCTION_NAIVE]; |
112 }; | 126 }; |
OLD | NEW |