| OLD | NEW |
| (Empty) | |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 // Protocol buffers used for storing in SQLite. |
| 6 |
| 7 syntax = "proto2"; |
| 8 |
| 9 package chrome_browser_predictors; |
| 10 |
| 11 // Required in Chrome. |
| 12 option optimize_for = LITE_RUNTIME; |
| 13 |
| 14 message Metadata { |
| 15 optional string main_page_url = 1; |
| 16 optional uint64 last_visit_time = 2; |
| 17 } |
| 18 |
| 19 message ResourceData { |
| 20 // Mirrors content::ResourceType. |
| 21 enum ResourceType { |
| 22 RESOURCE_TYPE_MAIN_FRAME = 0; |
| 23 RESOURCE_TYPE_SUB_FRAME = 1; |
| 24 RESOURCE_TYPE_STYLESHEET = 2; |
| 25 RESOURCE_TYPE_SCRIPT = 3; |
| 26 RESOURCE_TYPE_IMAGE = 4; |
| 27 RESOURCE_TYPE_FONT_RESOURCE = 5; |
| 28 RESOURCE_TYPE_SUB_RESOURCE = 6; |
| 29 RESOURCE_TYPE_OBJECT = 7; |
| 30 RESOURCE_TYPE_MEDIA = 8; |
| 31 RESOURCE_TYPE_WORKER = 9; |
| 32 RESOURCE_TYPE_SHARED_WORKER = 10; |
| 33 RESOURCE_TYPE_PREFETCH = 11; |
| 34 RESOURCE_TYPE_FAVICON = 12; |
| 35 RESOURCE_TYPE_XHR = 13; |
| 36 RESOURCE_TYPE_PING = 14; |
| 37 RESOURCE_TYPE_SERVICE_WORKER = 15; |
| 38 RESOURCE_TYPE_CSP_REPORT = 16; |
| 39 RESOURCE_TYPE_PLUGIN_RESOURCE = 17; |
| 40 RESOURCE_TYPE_LAST_TYPE = 18; |
| 41 } |
| 42 |
| 43 // Mirrors net::RequestPriority |
| 44 enum Priority { |
| 45 REQUEST_PRIORITY_IDLE = 0; |
| 46 REQUEST_PRIORITY_LOWEST = 1; |
| 47 REQUEST_PRIORITY_LOW = 2; |
| 48 REQUEST_PRIORITY_MEDIUM = 3; |
| 49 REQUEST_PRIORITY_HIGHEST = 4; |
| 50 } |
| 51 |
| 52 optional string primary_key = 1; |
| 53 optional string resource_url = 2; |
| 54 optional ResourceType resource_type = 3; |
| 55 optional uint32 number_of_hits = 4; |
| 56 optional uint32 number_of_misses = 5; |
| 57 optional uint32 consecutive_misses = 6; |
| 58 optional double average_position = 7; |
| 59 optional Priority priority = 8; |
| 60 optional bool has_validators = 9; |
| 61 optional bool always_revalidate = 10; |
| 62 } |
| OLD | NEW |