| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 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 | 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 // Protocol buffers used for storing in SQLite. | 5 // Protocol buffers used for storing in SQLite. |
| 6 // CAUTION: When any change is done here, bump kDatabaseVersion in | 6 // CAUTION: When any change is done here, bump kDatabaseVersion in |
| 7 // resource_prefetch_predictor_tables.h. | 7 // resource_prefetch_predictor_tables.h. |
| 8 | 8 |
| 9 syntax = "proto2"; | 9 syntax = "proto2"; |
| 10 | 10 |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 60 } | 60 } |
| 61 | 61 |
| 62 // Represents a collection of subresources associated with URL or host. | 62 // Represents a collection of subresources associated with URL or host. |
| 63 message PrefetchData { | 63 message PrefetchData { |
| 64 // Main frame URL of host. | 64 // Main frame URL of host. |
| 65 optional string primary_key = 1; | 65 optional string primary_key = 1; |
| 66 optional uint64 last_visit_time = 2; | 66 optional uint64 last_visit_time = 2; |
| 67 repeated ResourceData resources = 3; | 67 repeated ResourceData resources = 3; |
| 68 } | 68 } |
| 69 | 69 |
| 70 // Represents a single redirect chain endpoint. |
| 71 message RedirectStat { |
| 72 // Represents the host for RedirectData in a host-based table. |
| 73 optional string url = 1; |
| 74 optional uint32 number_of_hits = 2; |
| 75 optional uint32 number_of_misses = 3; |
| 76 optional uint32 consecutive_misses = 4; |
| 77 } |
| 78 |
| 70 // Represents a mapping from URL or host to a list of redirect endpoints. | 79 // Represents a mapping from URL or host to a list of redirect endpoints. |
| 71 message RedirectData { | 80 message RedirectData { |
| 72 // Represents a single redirect chain endpoint. | |
| 73 message RedirectStat { | |
| 74 // Represents the host for RedirectData in a host-based table. | |
| 75 optional string url = 1; | |
| 76 optional uint32 number_of_hits = 2; | |
| 77 optional uint32 number_of_misses = 3; | |
| 78 optional uint32 consecutive_misses = 4; | |
| 79 } | |
| 80 | |
| 81 // Main frame URL or host. | 81 // Main frame URL or host. |
| 82 optional string primary_key = 1; | 82 optional string primary_key = 1; |
| 83 optional uint64 last_visit_time = 2; | 83 optional uint64 last_visit_time = 2; |
| 84 repeated RedirectStat redirect_endpoints = 3; | 84 repeated RedirectStat redirect_endpoints = 3; |
| 85 } | 85 } |
| 86 | 86 |
| 87 // Historical data for a single origin accessed from a host. | 87 // Historical data for a single origin accessed from a host. |
| 88 message OriginStat { | 88 message OriginStat { |
| 89 optional string origin = 1; | 89 optional string origin = 1; |
| 90 optional uint32 number_of_hits = 2; | 90 optional uint32 number_of_hits = 2; |
| 91 optional uint32 number_of_misses = 3; | 91 optional uint32 number_of_misses = 3; |
| 92 optional uint32 consecutive_misses = 4; | 92 optional uint32 consecutive_misses = 4; |
| 93 optional double average_position = 5; | 93 optional double average_position = 5; |
| 94 optional bool always_access_network = 6; | 94 optional bool always_access_network = 6; |
| 95 optional bool accessed_network = 7; | 95 optional bool accessed_network = 7; |
| 96 } | 96 } |
| 97 | 97 |
| 98 // Collection of origins accessed from a host. | 98 // Collection of origins accessed from a host. |
| 99 message OriginData { | 99 message OriginData { |
| 100 optional string host = 1; | 100 optional string host = 1; |
| 101 optional uint64 last_visit_time = 2; | 101 optional uint64 last_visit_time = 2; |
| 102 repeated OriginStat origins = 3; | 102 repeated OriginStat origins = 3; |
| 103 } | 103 } |
| OLD | NEW |