File: user_consent_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 (114 lines) | stat: -rw-r--r-- 4,641 bytes parent folder | download | duplicates (5)
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
// Copyright 2018 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 user consents.

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

// Next id: 18
message UserConsentSpecifics {
  // ===========================================================================
  // Fields common to all Chrome User Consents.
  // ===========================================================================

  // The UI language Chrome is using, represented as the IETF language tag
  // defined in BCP 47. The region subtag is not included when it adds no
  // distinguishing information to the language tag (e.g. both "en-US"
  // and "fr" are correct here).
  optional string locale = 4;

  // The local time on the client when the user consent was recorded. The time
  // as measured by client is given in microseconds since Windows epoch. This
  // is needed since user consent recording may happen when a client is
  // offline.
  optional int64 client_consent_time_usec = 12;

  // ===========================================================================
  // The specific consent type. Add new User Consent types to
  // user_consent_types.proto.
  // ===========================================================================

  oneof consent {
    UserConsentTypes.SyncConsent sync_consent = 7;

    UserConsentTypes.ArcBackupAndRestoreConsent arc_backup_and_restore_consent =
        8;

    UserConsentTypes.ArcGoogleLocationServiceConsent
        arc_location_service_consent = 9;

    UserConsentTypes.ArcPlayTermsOfServiceConsent
        arc_play_terms_of_service_consent = 10;

    UserConsentTypes.UnifiedConsent unified_consent = 13 [deprecated = true];

    UserConsentTypes.AssistantActivityControlConsent
        assistant_activity_control_consent = 14;

    UserConsentTypes.AccountPasswordsConsent account_passwords_consent = 15;

    UserConsentTypes.RecorderSpeakerLabelConsent
        recorder_speaker_label_consent = 17;
  }
  reserved "arc_metrics_and_usage_consent";
  reserved 11;
  reserved "autofill_assistant_consent";
  reserved 16;

  // ===========================================================================
  // Client only fields.
  // ===========================================================================
  // TODO(markusheintz): Refactor the code so that these fields can be moved out
  // of this message.

  // The obfuscated Gaia ID of the user who gave the consent. This field is used
  // by UserEventService to distinguish consents from different users,
  // as UserConsent does not get deleted when a user signs out. However,
  // it should be cleared before being sent over the wire, as the UserEvent
  // is sent over an authenticated channel, so this information would be
  // redundant.
  //
  // For semantics and usage of the `obfuscated_gaia_id` in the signin codebase,
  // see IdentityManager::GetPrimaryAccountInfo() or GaiaId.
  optional string obfuscated_gaia_id = 6;

  // ===========================================================================
  // Deprecated fields. Please do not use them!
  // They have to remain in the proto because the server must continue
  // supporting legacy consent formats like this.
  // ===========================================================================

  // Which feature does the consent apply to?
  enum Feature {
    FEATURE_UNSPECIFIED = 0;
    CHROME_SYNC = 1;
    PLAY_STORE = 2;
    BACKUP_AND_RESTORE = 3;
    GOOGLE_LOCATION_SERVICE = 4;
    CHROME_UNIFIED_CONSENT = 5;
    // TODO(markusheintz): ASSISTANT_ACTIVITY_CONTROL was only added for
    // compatibility with the Feature enum in UserEventSpecifics.UserConsent.
    // Delete this value once the value is deleted from the other proto.
    ASSISTANT_ACTIVITY_CONTROL = 6;
  }
  optional Feature feature = 1 [deprecated = true];
  // Ids of the strings of the consent text presented to the user.
  repeated int32 description_grd_ids = 2 [deprecated = true];
  // Id of the string of the UI element the user clicked when consenting.
  optional int32 confirmation_grd_id = 3 [deprecated = true];
  // Was the consent for `feature` given or not given (denied/revoked)?
  optional UserConsentTypes.ConsentStatus status = 5 [deprecated = true];
}