File: bookmark_specifics.proto

package info (click to toggle)
chromium 139.0.7258.127-1
  • links: PTS, VCS
  • area: main
  • in suites:
  • size: 6,122,068 kB
  • sloc: cpp: 35,100,771; ansic: 7,163,530; javascript: 4,103,002; python: 1,436,920; asm: 946,517; xml: 746,709; pascal: 187,653; perl: 88,691; sh: 88,436; objc: 79,953; sql: 51,488; cs: 44,583; fortran: 24,137; makefile: 22,147; tcl: 15,277; php: 13,980; yacc: 8,984; ruby: 7,485; awk: 3,720; lisp: 3,096; lex: 1,327; ada: 727; jsp: 228; sed: 36
file content (95 lines) | stat: -rw-r--r-- 3,943 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
// Copyright 2012 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
// Sync protocol datatype extension for bookmarks.

// If you change or add any fields in this file, update proto_visitors.h and
// potentially proto_enum_conversions.{h, cc}.

syntax = "proto2";

option java_multiple_files = true;
option java_package = "org.chromium.components.sync.protocol";

option optimize_for = LITE_RUNTIME;

package sync_pb;

import "components/sync/protocol/unique_position.proto";

// Corresponds to a single meta info key/value pair for a bookmark node.
message MetaInfo {
  optional string key = 1;
  optional string value = 2;
}

// Properties of bookmark sync objects.
message BookmarkSpecifics {
  // URL of the bookmarked page (unset for folders).
  optional string url = 1;
  // PNG-encoded content of the favicon image (in practice 16x16, as determined
  // by `kFaviconSize`). Empty if the bookmark has no favicon (which includes
  // bookmark folders).
  optional bytes favicon = 2;
  // Contains legacy title which is truncated and may contain escaped symbols.
  optional string legacy_canonicalized_title = 3;
  // Corresponds to BookmarkNode::date_added() represented as microseconds since
  // the Windows epoch.
  optional int64 creation_time_us = 4;
  // The URL of the favicon image encoded in field `favicon`. Note that there
  // are various cases where this URL may be missing (field unset or empty) even
  // if the `favicon` field (image content) is populated:
  // 1. WebUI pages such as "chrome://bookmarks/" are missing a favicon URL but
  //    they have a favicon.
  // 2. Data generated by ancient clients (prior to M25) may not contain the
  //    favicon URL.
  // 3. If the favicon URL is too large (determined by `kMaxFaviconUrlSize`) it
  //    may be omitted by clients to avoid running into the max-entity-size
  //    limit. Most notably, this includes URLs prefixed with the data: scheme
  //    that may encode the image content itself in the URL.
  optional string icon_url = 5;
  repeated MetaInfo meta_info = 6;
  reserved 7;
  reserved 8;
  reserved 9;
  // Introduced in M81, it represents a globally unique and immutable ID.
  //
  // If present, it must be the same as originator_client_item_id in lowercase,
  // unless originator client item ID is not a valid GUID. In such cases (which
  // is the case for bookmarks created before 2015), this GUID must match the
  // value inferred from the combination of originator cache GUID and
  // originator client item ID, see InferGuidForLegacyBookmark().
  //
  // If not present, the value can be safely inferred using the very same
  // methods listed above.
  optional string guid = 10;
  // Contains full title as is. `legacy_canonicalized_title` is a prefix of
  // `full_title` with escaped symbols.
  optional string full_title = 11;
  reserved 12;
  reserved 13;
  // Introduced in M94, represents the GUID (field `guid`) of the parent.
  optional string parent_guid = 14;

  // Introduced in M94, determines whether this entity represents a bookmark
  // folder. This field is redundant to the similar field in SyncEntity. If this
  // field in specifics is set, it takes precedence over the one in SyncEntity.
  enum Type {
    // `UNSPECIFIED` is relevant only for the case where the field is not set.
    // M94 and above should not use this value.
    UNSPECIFIED = 0;
    URL = 1;
    FOLDER = 2;
  }
  optional Type type = 15;

  // Introduced in M94, determines ordering among siblings. This field is
  // redundant to the similar field in SyncEntity. If this field in specifics is
  // set, it takes precedence over the one in SyncEntity.
  optional UniquePosition unique_position = 16;

  // Introduced in M106, corresponds to BookmarkNode::date_last_used()
  // represented as microseconds since the Windows epoch.
  optional int64 last_used_time_us = 17;
}