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

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

Issue 2229983002: Send the list of used and unused resources for precache (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added more tests Created 4 years, 4 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
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 import "timestamp.proto";
8
7 package precache; 9 package precache;
8 10
9 // Chrome requires this. 11 // Chrome requires this.
10 option optimize_for = LITE_RUNTIME; 12 option optimize_for = LITE_RUNTIME;
11 13
12 // Information about a cacheable resource to be precached. 14 // Information about a cacheable resource to be precached.
13 message PrecacheResource { 15 message PrecacheResource {
14 // The URL of the resource. This field must always be present. 16 // The URL of the resource. This field must always be present.
15 optional string url = 1; 17 optional string url = 1;
18
19 // The tophost this resource corresponds to.
20 optional string top_host_name = 2;
16 }; 21 };
17 22
23 message PrecacheManifestId {
24 // Time at the creation of this manifest.
25 optional Timestamp timestamp = 1;
26 }
27
18 // A manifest of cacheable resources to be precached for a specific host. 28 // A manifest of cacheable resources to be precached for a specific host.
19 message PrecacheManifest { 29 message PrecacheManifest {
20 // List of resources that we predict that the user will need if they are 30 // List of resources that we predict that the user will need if they are
21 // likely to fetch the host. 31 // likely to fetch the host.
22 repeated PrecacheResource resource = 1; 32 repeated PrecacheResource resource = 1;
23 33
24 // Experiments running on this manifest. 34 // Experiments running on this manifest.
25 optional PrecacheExperiments experiments = 2; 35 optional PrecacheExperiments experiments = 2;
36
37 // Identifier for the manifest sent by the server.
38 optional PrecacheManifestId id = 3;
26 }; 39 };
27 40
28 message PrecacheExperiments { 41 message PrecacheExperiments {
29 // A mapping between experiment groups and the resources that should be 42 // A mapping between experiment groups and the resources that should be
30 // considered for the experiment. 43 // considered for the experiment.
31 map<fixed32, PrecacheResourceSelection> resources_by_experiment_group = 1; 44 map<fixed32, PrecacheResourceSelection> resources_by_experiment_group = 1;
32 } 45 }
33 46
34 message PrecacheResourceSelection { 47 message PrecacheResourceSelection {
35 // Select the resources as a std::bitset over the resources listed in the 48 // Select the resources as a std::bitset over the resources listed in the
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 // resources larger than this will be cancelled. This max applies only to new 81 // resources larger than this will be cancelled. This max applies only to new
69 // downloads; cached resources are not capped. 82 // downloads; cached resources are not capped.
70 optional uint64 max_bytes_per_resource = 4 [default = 500000 /* 500 KB */]; 83 optional uint64 max_bytes_per_resource = 4 [default = 500000 /* 500 KB */];
71 84
72 // The maximum number of bytes per precache run. While precaching, the total 85 // The maximum number of bytes per precache run. While precaching, the total
73 // number of bytes used for resources is tallied -- this includes new 86 // number of bytes used for resources is tallied -- this includes new
74 // downloads as well as cached resources. After this limit is reached, no 87 // downloads as well as cached resources. After this limit is reached, no
75 // other resources will be downloaded. 88 // other resources will be downloaded.
76 optional uint64 max_bytes_total = 5 [default = 10000000 /* 10 MB */]; 89 optional uint64 max_bytes_total = 5 [default = 10000000 /* 10 MB */];
77 }; 90 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698