Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 // Offline page item protocol for storage and exchanging of offline page | 5 // Offline page item protocol for storage and exchanging of offline page |
| 6 // metadata. | 6 // metadata. |
| 7 | 7 |
| 8 syntax = "proto2"; | 8 syntax = "proto2"; |
| 9 | 9 |
| 10 option optimize_for = LITE_RUNTIME; | 10 option optimize_for = LITE_RUNTIME; |
| 11 option retain_unknown_fields = true; | 11 option retain_unknown_fields = true; |
| 12 | 12 |
| 13 package offline_pages; | 13 package offline_pages; |
| 14 | 14 |
| 15 message OfflinePageEntry { | 15 message OfflinePageEntry { |
| 16 // URL of the offline page. | 16 // URL of the offline page. |
| 17 required string url = 1; | 17 optional string url = 1; |
| 18 | 18 |
| 19 // Bookmark ID of the offline page. | 19 // Bookmark ID of the offline page. |
| 20 required int64 bookmark_id = 2; | 20 optional int64 deprecated_bookmark_id = 2; |
|
fgorski
2016/02/23 17:15:31
specify default to -1 as that is the invalid bookm
bburns
2016/02/23 19:25:39
Done.
| |
| 21 | |
| 22 // Offline ID of the page. Offline ID has replaced Bookmark ID as the primary key | |
| 23 optional int64 offline_id = 10; | |
| 21 | 24 |
| 22 // Version of the offline page metadata. | 25 // Version of the offline page metadata. |
| 23 required int32 version = 3; | 26 optional int32 version = 3; |
| 24 | 27 |
| 25 // Path to the offline archive. | 28 // Path to the offline archive. |
| 26 required string file_path = 4; | 29 optional string file_path = 4; |
| 27 | 30 |
| 28 // Size of the offline archive. | 31 // Size of the offline archive. |
| 29 optional int64 file_size = 5; | 32 optional int64 file_size = 5; |
| 30 | 33 |
| 31 // Creation time of the offline archive. | 34 // Creation time of the offline archive. |
| 32 optional int64 creation_time = 6; | 35 optional int64 creation_time = 6; |
| 33 | 36 |
| 34 // Last access time of the offline archive. | 37 // Last access time of the offline archive. |
| 35 optional int64 last_access_time = 7; | 38 optional int64 last_access_time = 7; |
| 36 | 39 |
| 37 // Number of times that the offline archive has been accessed. | 40 // Number of times that the offline archive has been accessed. |
| 38 optional int32 access_count = 8; | 41 optional int32 access_count = 8; |
| 39 | 42 |
| 40 // Flags about the state and behavior of the offline page. | 43 // Flags about the state and behavior of the offline page. |
| 41 enum Flags { | 44 enum Flags { |
| 42 // No flag is set. | 45 // No flag is set. |
| 43 NONE = 0; | 46 NONE = 0; |
| 44 // Indicates that the page is marked for deletion. The real deletion will | 47 // Indicates that the page is marked for deletion. The real deletion will |
| 45 // occur soon, after which the undo will not be possible. | 48 // occur soon, after which the undo will not be possible. |
| 46 MARKED_FOR_DELETION = 1; | 49 MARKED_FOR_DELETION = 1; |
| 47 }; | 50 }; |
| 48 | 51 |
| 49 // Flags for the offline page. | 52 // Flags for the offline page. |
| 50 optional Flags flags = 9; | 53 optional Flags flags = 9; |
| 54 | |
| 55 // Information about this offline page in the namespace/id of the client that | |
| 56 // requested that it be saved. Useful for reverse lookups. | |
| 57 optional string client_id_name_space = 11; | |
| 58 optional string client_id = 12; | |
| 51 } | 59 } |
| OLD | NEW |