1 // Copyright (c) 2012 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.
5 // Sync protocol datatype extension for enhanced bookmarks.
9 option optimize_for = LITE_RUNTIME;
10 option retain_unknown_fields = true;
14 import "bookmark_specifics.proto";
16 message ChromeSyncFolioInfo {
17 // Client-generated id. This is opaque to Chrome and unique across all
18 // EnhancedBookmarkSpecifics for a given user.
19 optional string folio_id = 1;
20 // Computed as per enhanced_bookmarks::ItemPosition.
21 optional string position = 2;
23 // The size the clip should be displayed in Folio view (i.e. which images
24 // should be large in hero layout).
29 optional DisplaySize display_size = 3 [default = SMALL];
32 message ChromeSyncImageData {
34 // The (normalized) URL this image can be found at.
35 optional string url = 1;
37 // The dimensions in pixels.
38 optional int32 width = 2;
39 optional int32 height = 3;
42 // Information about the original image.
43 optional ImageInfo original_info = 2;
45 // Information about the hosted thumbnail.
46 optional ImageInfo thumbnail_info = 3;
48 // The expiration timestamp of the served thumbnail, in microseconds since
49 // the Linux epoch. The thumbnail is only guaranteed until this time,
50 // afterwards the URL may be broken.
51 optional int64 expiration_timestamp_us = 4;
54 message ChromeSyncClip {
55 // Client-generated id. This is opaque to Chrome and unique across all
56 // EnhancedBookmarkSpecifics for a given user.
57 optional string id = 1;
58 optional string note = 2;
59 repeated ChromeSyncFolioInfo folio_info = 3;
60 optional string url = 4;
61 optional string title = 5;
62 optional string snippet = 6;
63 optional ChromeSyncImageData image = 7;
64 // Corresponds to BookmarkNode::date_added() and is the internal value from
65 // base::Time, in microseconds since the Windows epoch.
66 optional int64 created_timestamp_us = 8;
68 // True if url points to a site that may serve malware. Allows warnings to be
70 optional bool is_malware = 9;
72 // Reasons for failed fetches.
73 enum FetchErrorReason {
79 // Reason that fetching this page failed. This field is populated only if
80 // the most recent fetch attempt failed.
81 optional FetchErrorReason fetch_error_reason = 10;
83 // Bookmark manager or mobile client extension version, for logging and
84 // debugging purposes.
85 optional string client_version = 11;
87 message LegacyBookmarkData {
88 optional bytes favicon = 1;
89 optional string icon_url = 2;
92 optional LegacyBookmarkData bookmark_data = 12;
94 repeated MetaInfo meta_info = 13;
97 message ChromeSyncFolio {
98 // Client-generated id.
99 optional string id = 1;
100 // If set, is the Folio id that corresponds to a Chrome bookmarks folder. As a
101 // special case, the root folder is assigned an empty string.
102 optional string parent_id = 2;
103 optional string title = 3;
104 optional string description = 4;
105 optional bool is_public = 5;
106 // Corresponds to BookmarkNode::date_added() and is the internal value from
107 // base::Time, in microseconds since the Windows epoch.
108 optional int64 created_timestamp_us = 6;
109 // Set if parent_id is set. The position of this folio in its
110 // parent folio. This is the analog of ChromeSyncFolioInfo.position in clips.
111 optional string position = 7;
112 // Bookmark manager or mobile client extension version, for logging and
113 // debugging purposes.
114 optional string client_version = 13;
116 repeated MetaInfo meta_info = 14;
119 // Properties of enhanced bookmark sync objects.
120 message EnhancedBookmarkSpecifics {
121 // Exactly one of clip or folio is set.
122 optional ChromeSyncClip clip = 1;
123 optional ChromeSyncFolio folio = 2;