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

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: Addressed nits Created 4 years, 3 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 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;
11 11
12 // Information about a cacheable resource to be precached. 12 // Information about a cacheable resource to be precached.
13 message PrecacheResource { 13 message PrecacheResource {
14 // The URL of the resource. This field must always be present. 14 // The URL of the resource. This field must always be present.
15 optional string url = 1; 15 optional string url = 1;
16
17 // The tophost this resource corresponds to.
18 optional string top_host_name = 2;
19 };
20
21 message PrecacheManifestId {
22 optional int64 id = 1;
16 }; 23 };
17 24
18 // A manifest of cacheable resources to be precached for a specific host. 25 // A manifest of cacheable resources to be precached for a specific host.
19 message PrecacheManifest { 26 message PrecacheManifest {
20 // List of resources that we predict that the user will need if they are 27 // List of resources that we predict that the user will need if they are
21 // likely to fetch the host. 28 // likely to fetch the host.
22 repeated PrecacheResource resource = 1; 29 repeated PrecacheResource resource = 1;
23 30
24 // Experiments running on this manifest. 31 // Experiments running on this manifest.
25 optional PrecacheExperiments experiments = 2; 32 optional PrecacheExperiments experiments = 2;
33
34 // Identifier for the manifest sent by the server.
35 optional PrecacheManifestId id = 3;
26 }; 36 };
27 37
28 message PrecacheExperiments { 38 message PrecacheExperiments {
29 // A mapping between experiment groups and the resources that should be 39 // A mapping between experiment groups and the resources that should be
30 // considered for the experiment. 40 // considered for the experiment.
31 map<fixed32, PrecacheResourceSelection> resources_by_experiment_group = 1; 41 map<fixed32, PrecacheResourceSelection> resources_by_experiment_group = 1;
32 } 42 };
33 43
34 message PrecacheResourceSelection { 44 message PrecacheResourceSelection {
35 // Select the resources as a std::bitset over the resources listed in the 45 // Select the resources as a std::bitset over the resources listed in the
36 // manifest. 46 // manifest.
37 // 47 //
38 // The bitset should be loaded as: 48 // The bitset should be loaded as:
39 // std::bitset selection(resource_selection.bitset()); 49 // std::bitset selection(resource_selection.bitset());
40 // Then manifest.resource(i) is selected for the experiment iff 50 // Then manifest.resource(i) is selected for the experiment iff
41 // selection.test(i). 51 // selection.test(i).
42 // 52 //
43 // A missing bitset means that the experiment applies to all the resources. 53 // A missing bitset means that the experiment applies to all the resources.
44 optional fixed64 bitset = 1 [default = 0xFFFFFFFFFFFFFFFF]; 54 optional fixed64 bitset = 1 [default = 0xFFFFFFFFFFFFFFFF];
45 } 55 };
46 56
47 message PrecacheConfigurationSettings { 57 message PrecacheConfigurationSettings {
48 // The maximum rank of the user's most visited hosts to consider precaching 58 // The maximum rank of the user's most visited hosts to consider precaching
49 // resources for, starting from 1. For example, a value of 10 means that only 59 // resources for, starting from 1. For example, a value of 10 means that only
50 // hosts that are in the user's top 10 most visited hosts will be considered 60 // hosts that are in the user's top 10 most visited hosts will be considered
51 // as starting URLs for resource precaching. This is specified by the server 61 // as starting URLs for resource precaching. This is specified by the server
52 // for testing purposes, so that it's easy to adjust how aggressively 62 // for testing purposes, so that it's easy to adjust how aggressively
53 // resources are precached. 63 // resources are precached.
54 // Values that are zero or lower indicate that none of the user's top sites 64 // Values that are zero or lower indicate that none of the user's top sites
55 // will be used for precaching. 65 // will be used for precaching.
(...skipping 12 matching lines...) Expand all
68 // resources larger than this will be cancelled. This max applies only to new 78 // resources larger than this will be cancelled. This max applies only to new
69 // downloads; cached resources are not capped. 79 // downloads; cached resources are not capped.
70 optional uint64 max_bytes_per_resource = 4 [default = 500000 /* 500 KB */]; 80 optional uint64 max_bytes_per_resource = 4 [default = 500000 /* 500 KB */];
71 81
72 // The maximum number of bytes per precache run. While precaching, the total 82 // The maximum number of bytes per precache run. While precaching, the total
73 // number of bytes used for resources is tallied -- this includes new 83 // number of bytes used for resources is tallied -- this includes new
74 // downloads as well as cached resources. After this limit is reached, no 84 // downloads as well as cached resources. After this limit is reached, no
75 // other resources will be downloaded. 85 // other resources will be downloaded.
76 optional uint64 max_bytes_total = 5 [default = 10000000 /* 10 MB */]; 86 optional uint64 max_bytes_total = 5 [default = 10000000 /* 10 MB */];
77 }; 87 };
OLDNEW
« no previous file with comments | « components/precache/core/precache_url_table_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