File: power_bookmark_specifics.proto

package info (click to toggle)
chromium 138.0.7204.183-1~deb12u1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm-proposed-updates
  • size: 6,080,960 kB
  • sloc: cpp: 34,937,079; ansic: 7,176,967; javascript: 4,110,704; python: 1,419,954; asm: 946,768; xml: 739,971; pascal: 187,324; sh: 89,623; perl: 88,663; objc: 79,944; sql: 50,304; cs: 41,786; fortran: 24,137; makefile: 21,811; php: 13,980; tcl: 13,166; yacc: 8,925; ruby: 7,485; awk: 3,720; lisp: 3,096; lex: 1,327; ada: 727; jsp: 228; sed: 36
file content (57 lines) | stat: -rw-r--r-- 1,558 bytes parent folder | download | duplicates (8)
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
// Copyright 2022 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

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/note_entity.proto";

// Data structure dedicated to each power type.
// Should keep the field numbers of specifics in sync with the ones in PowerType
// below.
message PowerEntity {
  oneof entity {
    // Used for notes.
    NoteEntity note_entity = 2;
  }
}

message PowerBookmarkSpecifics {
  // PowerType is persisted to disk and therefore shouldn't be reoderered or
  // changed.
  // Should keep the field numbers of PowerType in sync with the ones in
  // entity above.
  enum PowerType {
    // All powers should have type so this should be unused.
    POWER_TYPE_UNSPECIFIED = 0;
    // Used for testing.
    POWER_TYPE_MOCK = 1;
    // Used for notes.
    POWER_TYPE_NOTE = 2;
  }

  // The primary key for local storage.
  /* required */ optional string guid = 1;

  // Powers associated with a URL.
  /* required */ optional string url = 2;

  // Tracks the type of the power.
  /* required */ optional PowerType power_type = 3;

  // Tracks when this was added.
  /* required */ optional int64 creation_time_usec = 4;

  // Tracks when this was last modified.
  /* required */ optional int64 update_time_usec = 5;

  // Power entity.
  /* required */ optional PowerEntity power_entity = 100;
}