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

Unified Diff: components/precache/core/proto/precache.proto

Issue 2403193002: Precache: Optionally rank resources-to-precache globally. (Closed)
Patch Set: Rebase. Created 4 years, 2 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
Index: components/precache/core/proto/precache.proto
diff --git a/components/precache/core/proto/precache.proto b/components/precache/core/proto/precache.proto
index ace29cfbe9fed9e25db301e20e28177053a729e7..f5124bcc2d3bcb8f288cd9fb93ec36895edd90e5 100644
--- a/components/precache/core/proto/precache.proto
+++ b/components/precache/core/proto/precache.proto
@@ -16,6 +16,10 @@ message PrecacheResource {
// The tophost this resource corresponds to.
optional string top_host_name = 2;
+
+ // How important this resource is for the host. It ranges from 0.0 to 1.0.
+ // Higher values mean more important.
+ optional double weight_ratio = 3;
};
message PrecacheManifestId {
@@ -89,4 +93,16 @@ message PrecacheConfigurationSettings {
// day. After this limit is reached, no more resources will be downloaded,
// until the quota gets replenished the next day.
optional uint64 daily_quota_total = 6 [default = 40000000 /* 40 MB */];
+
+ // The number of resources to fetch per precache run. Only the first
+ // |total_resources_count| resource URLs are fetched.
+ optional uint32 total_resources_count = 7 [default = 999999];
+
+ // The minimum visit-adjusted weight for which a resource will be downloaded.
+ optional double min_weight = 8 [default = 0];
+
+ // Whether to sort resources by weight, descending, before fetching. This
+ // affects the fetcher's behavior with respect to max_bytes_total and
+ // total_resources_count.
+ optional bool global_ranking = 9 [default = false];
};
« no previous file with comments | « components/precache/core/precache_fetcher_unittest.cc ('k') | components/precache/core/proto/unfinished_work.proto » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698