Chromium Code Reviews| Index: chrome/browser/predictors/resource_prefetch_predictor.proto |
| diff --git a/chrome/browser/predictors/resource_prefetch_predictor.proto b/chrome/browser/predictors/resource_prefetch_predictor.proto |
| index 6d2a59be1a5bf56905c926b4bb44a4ef367e4a11..bbee8bc53af6555ccc0ab802448a28d4c21dec29 100644 |
| --- a/chrome/browser/predictors/resource_prefetch_predictor.proto |
| +++ b/chrome/browser/predictors/resource_prefetch_predictor.proto |
| @@ -18,48 +18,57 @@ message Metadata { |
| optional uint64 last_visit_time = 2; |
| } |
| -message ResourceData { |
| - // Mirrors content::ResourceType. |
| - enum ResourceType { |
| - RESOURCE_TYPE_MAIN_FRAME = 0; |
| - RESOURCE_TYPE_SUB_FRAME = 1; |
| - RESOURCE_TYPE_STYLESHEET = 2; |
| - RESOURCE_TYPE_SCRIPT = 3; |
| - RESOURCE_TYPE_IMAGE = 4; |
| - RESOURCE_TYPE_FONT_RESOURCE = 5; |
| - RESOURCE_TYPE_SUB_RESOURCE = 6; |
| - RESOURCE_TYPE_OBJECT = 7; |
| - RESOURCE_TYPE_MEDIA = 8; |
| - RESOURCE_TYPE_WORKER = 9; |
| - RESOURCE_TYPE_SHARED_WORKER = 10; |
| - RESOURCE_TYPE_PREFETCH = 11; |
| - RESOURCE_TYPE_FAVICON = 12; |
| - RESOURCE_TYPE_XHR = 13; |
| - RESOURCE_TYPE_PING = 14; |
| - RESOURCE_TYPE_SERVICE_WORKER = 15; |
| - RESOURCE_TYPE_CSP_REPORT = 16; |
| - RESOURCE_TYPE_PLUGIN_RESOURCE = 17; |
| - RESOURCE_TYPE_LAST_TYPE = 18; |
| - } |
| +// Represents collection of subresources associated with URL or host. |
| +message PrefetchData { |
|
alexilin
2016/10/03 14:07:12
I also would like to rename these messages that re
|
| + // Represents information about single subresource. |
|
Benoit L
2016/10/04 08:22:42
You don't have to nest this message in this one.
C
alexilin
2016/10/04 09:43:48
Done.
|
| + message ResourceData { |
| + // Mirrors content::ResourceType. |
| + enum ResourceType { |
| + RESOURCE_TYPE_MAIN_FRAME = 0; |
| + RESOURCE_TYPE_SUB_FRAME = 1; |
| + RESOURCE_TYPE_STYLESHEET = 2; |
| + RESOURCE_TYPE_SCRIPT = 3; |
| + RESOURCE_TYPE_IMAGE = 4; |
| + RESOURCE_TYPE_FONT_RESOURCE = 5; |
| + RESOURCE_TYPE_SUB_RESOURCE = 6; |
| + RESOURCE_TYPE_OBJECT = 7; |
| + RESOURCE_TYPE_MEDIA = 8; |
| + RESOURCE_TYPE_WORKER = 9; |
| + RESOURCE_TYPE_SHARED_WORKER = 10; |
| + RESOURCE_TYPE_PREFETCH = 11; |
| + RESOURCE_TYPE_FAVICON = 12; |
| + RESOURCE_TYPE_XHR = 13; |
| + RESOURCE_TYPE_PING = 14; |
| + RESOURCE_TYPE_SERVICE_WORKER = 15; |
| + RESOURCE_TYPE_CSP_REPORT = 16; |
| + RESOURCE_TYPE_PLUGIN_RESOURCE = 17; |
| + RESOURCE_TYPE_LAST_TYPE = 18; |
| + } |
| + |
| + // Mirrors net::RequestPriority |
| + enum Priority { |
| + REQUEST_PRIORITY_IDLE = 0; |
| + REQUEST_PRIORITY_LOWEST = 1; |
| + REQUEST_PRIORITY_LOW = 2; |
| + REQUEST_PRIORITY_MEDIUM = 3; |
| + REQUEST_PRIORITY_HIGHEST = 4; |
| + } |
| - // Mirrors net::RequestPriority |
| - enum Priority { |
| - REQUEST_PRIORITY_IDLE = 0; |
| - REQUEST_PRIORITY_LOWEST = 1; |
| - REQUEST_PRIORITY_LOW = 2; |
| - REQUEST_PRIORITY_MEDIUM = 3; |
| - REQUEST_PRIORITY_HIGHEST = 4; |
| + optional string resource_url = 1; |
| + optional ResourceType resource_type = 2; |
| + optional uint32 number_of_hits = 3; |
| + optional uint32 number_of_misses = 4; |
| + optional uint32 consecutive_misses = 5; |
| + optional double average_position = 6; |
| + optional Priority priority = 7; |
| + optional bool has_validators = 8; |
| + optional bool always_revalidate = 9; |
| } |
| - optional string resource_url = 1; |
| - optional ResourceType resource_type = 2; |
| - optional uint32 number_of_hits = 3; |
| - optional uint32 number_of_misses = 4; |
| - optional uint32 consecutive_misses = 5; |
| - optional double average_position = 6; |
| - optional Priority priority = 7; |
| - optional bool has_validators = 8; |
| - optional bool always_revalidate = 9; |
| + // Represents main frame URL of host. |
| + optional string primary_key = 1; |
| + optional uint64 last_visit_time = 2; |
| + repeated ResourceData resources = 3; |
| } |
| // Represents a mapping from URL or host to a list of redirect endpoints. |