File: webui.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 (127 lines) | stat: -rw-r--r-- 4,758 bytes parent folder | download | duplicates (9)
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
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
// Copyright 2017 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

// This file includes Safe Browsing WebUI protocol buffer.

syntax = "proto2";

package safe_browsing;

option optimize_for = LITE_RUNTIME;

// Describes the state of the database manager.
message DatabaseManagerInfo {
  // Describes the status of the last update request sent to SafeBrowsing.
  message UpdateInfo {
    // Network status code for the last update request sent to SafeBrowsing.
    optional int32 network_status_code = 1;

    // The time, since epoch, when the last update request was sent to
    // SafeBrowsing.
    optional uint64 last_update_time_millis = 2;

    // The time, since epoch, when the next update request will be sent to
    // SafeBrowsing.
    optional uint64 next_update_time_millis = 3;
  }

  optional UpdateInfo update_info = 1;

  // Describes the state of the database.
  message DatabaseInfo {
    // Was the last update applied successfully?
    optional bool update_successful = 1;

    // Sum of the store sizes in the database.
    optional uint64 database_size_bytes = 2;

    // Describes the state of a store in the database.
    message StoreInfo {
      // The store file name.
      optional string file_name = 1;

      // The store file size.
      optional int64 file_size_bytes = 2;

      // The status of applying the updates fetched from the server to the
      // store. The values of update_status corresponds to the enum
      // ApplyUpdateResult in V4Store.
      optional int32 update_status = 3;

      // The time, since epoch, of applying the updates to the store.
      optional uint64 last_apply_update_time_millis = 4;

      // The number of times the store has been queried for a prefix.
      optional uint32 checks_attempted = 5;

      // The current state of the client for the requested store (the encrypted
      // ClientState that was sent to the client from the previous request).
      optional string state = 6;

      // A message encapsulating the number of prefixes of a given size.
      message PrefixSet {
        // Size of the prefixes in the set, in bytes.
        optional int64 size = 1;

        // Number of prefixes in the set.
        optional int64 count = 2;
      }

      // Has an entry for each prefix size found within the store as well as the
      // corresponding count of prefixes of that size.
      repeated PrefixSet prefix_sets = 7;
    }

    // Information about each of the stores managed by the database.
    repeated StoreInfo store_info = 3;
  }

  optional DatabaseInfo database_info = 2;
}

// The information about the list of prefixes for which the full hashes have
// been stored in the cache.
message FullHashCacheInfo {
  // Records number of cache hits since the beginning of the session.
  optional int32 number_of_hits = 1;
  // Cached full hashes received from the server for the corresponding hash
  // prefixes.
  message FullHashCache {
    // The hash prefix for which the full hashes are stored in the cache.
    optional string hash_prefix = 1;
    // The information about a hash prefix stored in the cache.
    message CachedHashPrefixInfo {
      // The negative ttl for the hash prefix.
      optional int64 negative_expiry = 1;
      // The information about a particular full hash.
      message FullHashInfo {
        // The expiration time of the full hash for a particular store.
        optional int64 positive_expiry = 1;
        // A variable-length SHA256 hash with size between 4 and 32 bytes
        // inclusive.
        optional string full_hash = 2;
        // The list for which this full hash is applicable.
        message ListIdentifier {
          // Types of platforms. The value of platform_type corresponds to the
          // PlatformType enum in safebrowsing_proto.
          optional int32 platform_type = 1;
          // Types of entries that pose threats. The value of threat_entry_type
          // corresponds to the ThreatEntryType enum in safebrowsing_proto.
          optional int32 threat_entry_type = 2;
          // Types of threats. The value of threat_type corresponds to the
          // ThreatType enum in safebrowsing_proto.
          optional int32 threat_type = 3;
        }
        optional ListIdentifier list_identifier = 3;
      }
      // The list of all full hashes (and related info) that start with a
      // particular hash prefix and are known to be unsafe.
      repeated FullHashInfo full_hash_info = 2;
    }
    // Information about the cached hash prefix for each hash prefix in the
    // cache.
    optional CachedHashPrefixInfo cached_hash_prefix_info = 2;
  }
  repeated FullHashCache full_hash_cache = 2;
}