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

Unified 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « components/precache/core/precache_fetcher_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/precache/core/proto/precache.proto
diff --git a/components/precache/core/proto/precache.proto b/components/precache/core/proto/precache.proto
index 72bcc066029b9eb3cb9a9b8ad955b352b484ed52..dd80621a3b66ac57cf1fa8b1d19ecc0a77fac899 100644
--- a/components/precache/core/proto/precache.proto
+++ b/components/precache/core/proto/precache.proto
@@ -109,4 +109,18 @@ message PrecacheConfigurationSettings {
// If true, resource fetches are only made over the network for a given URL if
// an existing cache entry exists and has revalidation headers.
optional bool revalidation_only = 10 [default = false];
+
+ // The function to use to combine a resource's weight_ratio with its
+ // referring manifest's host_visits count to produce a final score.
+ enum ResourceWeightFunction {
+ // Models the expected number of requests for the resource in the next 30
+ // days, given that weight_ratio is a probability that a visit to the host
+ // will request a resource, and host_visits is an estimate of the number of
+ // visits to the host in the next 30 days.
+ FUNCTION_NAIVE = 0;
+ // Models the probability of at least one request, given the same.
+ FUNCTION_GEOMETRIC = 1;
+ };
+ optional ResourceWeightFunction resource_weight_function = 11
+ [default = FUNCTION_NAIVE];
};
« 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