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

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

Issue 2403193002: Precache: Optionally rank resources-to-precache globally. (Closed)
Patch Set: Code readability improvements per bengr. 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 3f2607df9b4b64d89d438748f91ee4748f264894..666179a55616d777f85e02c2d6c54fbc7447ef86 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 {
@@ -71,7 +75,8 @@ message PrecacheConfigurationSettings {
repeated string forced_site = 2;
// The number of resources to fetch for each site. Only the top
- // |top_resources_count| URLs from each manifest are fetched.
+ // |top_resources_count| URLs from each manifest are fetched. Not applicable
+ // if global ranking is enabled.
optional int32 top_resources_count = 3 [default = 100];
// The maximum number of bytes to download per resource. Downloads of
@@ -89,4 +94,13 @@ 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 /* 10 MB */];
+
+ // The number of resources to fetch per precache run. Only the first
+ // |total_resources_count| URLs are fetched, regardless of whether global
+ // ranking is enabled.
+ optional uint32 total_resources_count = 7 [default = 999999];
+
+ // The minimum visit-adjusted weight for which a resource will be downloaded.
+ // Only applicable if global ranking is enabled.
+ optional double min_weight = 8 [default = 0];
};

Powered by Google App Engine
This is Rietveld 408576698