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

Side by Side Diff: components/offline_pages/proto/offline_pages.proto

Issue 1694863003: Refactor the offline page storage to include client namespace and id. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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 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 // ClientID represents an identified in the API Client's namespace. It is mappe d to an offline_id which
Dmitry Titov 2016/02/12 21:46:51 Is there a need to map this client-provided info i
bburns 2016/02/20 01:14:18 Done.
16 // serves as the primary key for offline storage.
17 message ClientId {
18 optional string space = 1;
19 optional string id = 2;
20 }
21
15 message OfflinePageEntry { 22 message OfflinePageEntry {
16 // URL of the offline page. 23 // URL of the offline page.
17 required string url = 1; 24 optional string url = 1;
18 25
19 // Bookmark ID of the offline page. 26 // Bookmark ID of the offline page.
20 required int64 bookmark_id = 2; 27 optional int64 deprecated_bookmark_id = 2;
28
29 // Offline ID of the page. Offline ID has replaced Bookmark ID as the primary key
30 optional int64 offline_id = 10;
21 31
22 // Version of the offline page metadata. 32 // Version of the offline page metadata.
23 required int32 version = 3; 33 optional int32 version = 3;
24 34
25 // Path to the offline archive. 35 // Path to the offline archive.
26 required string file_path = 4; 36 optional string file_path = 4;
27 37
28 // Size of the offline archive. 38 // Size of the offline archive.
29 optional int64 file_size = 5; 39 optional int64 file_size = 5;
30 40
31 // Creation time of the offline archive. 41 // Creation time of the offline archive.
32 optional int64 creation_time = 6; 42 optional int64 creation_time = 6;
33 43
34 // Last access time of the offline archive. 44 // Last access time of the offline archive.
35 optional int64 last_access_time = 7; 45 optional int64 last_access_time = 7;
36 46
37 // Number of times that the offline archive has been accessed. 47 // Number of times that the offline archive has been accessed.
38 optional int32 access_count = 8; 48 optional int32 access_count = 8;
39 49
40 // Flags about the state and behavior of the offline page. 50 // Flags about the state and behavior of the offline page.
41 enum Flags { 51 enum Flags {
42 // No flag is set. 52 // No flag is set.
43 NONE = 0; 53 NONE = 0;
44 // Indicates that the page is marked for deletion. The real deletion will 54 // Indicates that the page is marked for deletion. The real deletion will
45 // occur soon, after which the undo will not be possible. 55 // occur soon, after which the undo will not be possible.
46 MARKED_FOR_DELETION = 1; 56 MARKED_FOR_DELETION = 1;
47 }; 57 };
48 58
49 // Flags for the offline page. 59 // Flags for the offline page.
50 optional Flags flags = 9; 60 optional Flags flags = 9;
61
62 // ClientID for this entry, used for reverse lookups.
63 optional ClientId client_id = 11;
51 } 64 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698