OLD | NEW |
---|---|
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 // Protocol buffer for permission reports sent to the Safe Browsing client-side | 5 // Protocol buffer for permission reports sent to the Safe Browsing client-side |
6 // detection (CSD) frontends. This should stay in sync with the Safe Browsing | 6 // detection (CSD) frontends. This should stay in sync with the Safe Browsing |
7 // server-side protocol buffer. | 7 // server-side protocol buffer. |
8 | 8 |
9 syntax = "proto2"; | 9 syntax = "proto2"; |
10 | 10 |
11 option optimize_for = LITE_RUNTIME; | 11 option optimize_for = LITE_RUNTIME; |
12 | 12 |
13 package safe_browsing; | 13 package safe_browsing; |
14 | 14 |
15 // A single Permission Report sent to Safe Browsing client-side detection | 15 // A single Permission Report sent to Safe Browsing client-side detection |
16 // frontends. | 16 // frontends. |
(...skipping 12 matching lines...) Expand all Loading... | |
29 | 29 |
30 // The action the user took. Required. | 30 // The action the user took. Required. |
31 optional Action action = 5; | 31 optional Action action = 5; |
32 | 32 |
33 // The UI used to complete the action. | 33 // The UI used to complete the action. |
34 optional SourceUI source_ui = 6; | 34 optional SourceUI source_ui = 6; |
35 | 35 |
36 // The relevant field trials enabled for this report. | 36 // The relevant field trials enabled for this report. |
37 repeated FieldTrial field_trials = 7; | 37 repeated FieldTrial field_trials = 7; |
38 | 38 |
39 // The number of dismissals on a prompt for this permission and origin prior | |
40 // to this report. | |
41 optional int32 num_prior_dismissals = 8; | |
Nathan Parker
2016/08/15 18:48:49
Please clarify in the comments: Are these counts s
kcarattini
2016/08/16 04:11:14
Done.
| |
42 | |
43 // The number of ignores of a prompt for this permission and origin prior to | |
44 // this report. | |
45 optional int32 num_prior_ignores = 9; | |
46 | |
47 // The persistence decision on a prompt. Only some experimental prompts will | |
48 // have this field set. | |
49 optional PersistDecision persisted = 10; | |
50 | |
39 // Platform | 51 // Platform |
40 enum PlatformType { | 52 enum PlatformType { |
41 PLATFORM_TYPE_UNSPECIFIED = 0; | 53 PLATFORM_TYPE_UNSPECIFIED = 0; |
42 DESKTOP_PLATFORM = 1; | 54 DESKTOP_PLATFORM = 1; |
43 ANDROID_PLATFORM = 2; | 55 ANDROID_PLATFORM = 2; |
44 } | 56 } |
45 | 57 |
46 // Whether the action occurred after a user gesture. | 58 // Whether the action occurred after a user gesture. |
47 enum GestureType { | 59 enum GestureType { |
48 GESTURE_TYPE_UNSPECIFIED = 0; | 60 GESTURE_TYPE_UNSPECIFIED = 0; |
49 GESTURE = 1; | 61 GESTURE = 1; |
50 NO_GESTURE = 2; | 62 NO_GESTURE = 2; |
51 } | 63 } |
52 | 64 |
53 // User Permission Actions. This enum is intentionally different with | 65 // User Permission Actions. This enum is intentionally different from |
54 // the one in src/chrome/browser/permissions/permission_uma_util.h | 66 // the one in src/chrome/browser/permissions/permission_uma_util.h |
55 enum Action { | 67 enum Action { |
56 ACTION_UNSPECIFIED = 0; | 68 ACTION_UNSPECIFIED = 0; |
57 GRANTED = 1; | 69 GRANTED = 1; |
58 DENIED = 2; | 70 DENIED = 2; |
59 DISMISSED = 3; | 71 DISMISSED = 3; |
60 IGNORED = 4; | 72 IGNORED = 4; |
61 REVOKED = 5; | 73 REVOKED = 5; |
62 } | 74 } |
63 | 75 |
(...skipping 14 matching lines...) Expand all Loading... | |
78 PUSH_MESSAGING = 2; | 90 PUSH_MESSAGING = 2; |
79 NOTIFICATIONS = 3; | 91 NOTIFICATIONS = 3; |
80 GEOLOCATION = 4; | 92 GEOLOCATION = 4; |
81 PROTECTED_MEDIA_IDENTIFIER = 5; | 93 PROTECTED_MEDIA_IDENTIFIER = 5; |
82 MIDI = 6; | 94 MIDI = 6; |
83 DURABLE_STORAGE = 7; | 95 DURABLE_STORAGE = 7; |
84 AUDIO_CAPTURE = 8; | 96 AUDIO_CAPTURE = 8; |
85 VIDEO_CAPTURE = 9; | 97 VIDEO_CAPTURE = 9; |
86 } | 98 } |
87 | 99 |
100 // Whether the decision on a prompt was persisted. | |
101 enum PersistDecision { | |
102 PERSIST_DECISION_UNSPECIFIED = 0; | |
103 PERSISTED = 1; | |
104 NOT_PERSISTED = 2; | |
105 } | |
106 | |
88 // Description of a field trial or experiment that the user is currently | 107 // Description of a field trial or experiment that the user is currently |
89 // enrolled in. All metrics reported in this upload can potentially be | 108 // enrolled in. All metrics reported in this upload can potentially be |
90 // influenced by the field trial. | 109 // influenced by the field trial. |
91 message FieldTrial { | 110 message FieldTrial { |
92 // The name of the field trial, as a 32-bit identifier. Currently, the | 111 // The name of the field trial, as a 32-bit identifier. Currently, the |
93 // identifier is a hash of the field trial's name. | 112 // identifier is a hash of the field trial's name. |
94 optional fixed32 name_id = 1; | 113 optional fixed32 name_id = 1; |
95 | 114 |
96 // The user's group within the field trial, as a 32-bit identifier. | 115 // The user's group within the field trial, as a 32-bit identifier. |
97 // Currently, the identifier is a hash of the group's name. | 116 // Currently, the identifier is a hash of the group's name. |
98 optional fixed32 group_id = 2; | 117 optional fixed32 group_id = 2; |
99 } | 118 } |
100 } | 119 } |
OLD | NEW |