Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(119)

Side by Side Diff: components/precache/core/proto/precache.proto

Issue 2623553003: precache: Add geometric resource weight function. (Closed)
Patch Set: Add default case, needed by some compilers. Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « components/precache/core/precache_fetcher_unittest.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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 };
OLDNEW
« no previous file with comments | « components/precache/core/precache_fetcher_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698