Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1184)

Side by Side Diff: chrome/common/safe_browsing/permission_report.proto

Issue 2001963003: Add protocol buffer for reporting permission actions to Safe Browsing servers (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update platform enum Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « chrome/common/safe_browsing/BUILD.gn ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
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
7 // server-side protocol buffer.
8
9 syntax = "proto2";
10
11 option optimize_for = LITE_RUNTIME;
12
13 package safe_browsing;
14
15 // A single Permission Report sent to Safe Browsing client-side detection
16 // frontends.
17 message PermissionReport {
18 // The origin (scheme/host/port) of the site requesting the permission.
19 optional string origin = 1;
20
21 // The permission being requested/acted upon.
22 optional PermissionType permission = 2;
23
24 // The platform.
25 optional PlatformType platform_type = 3;
26
27 // When the request was initiated.
28 repeated RequestTrigger request_trigger = 4;
29
30 // The action the user took. Required.
31 optional Action action = 5;
32
33 // The UI used to complete the action.
34 optional SourceUI source_ui = 6;
35
36 // The relevant field trials enabled for this report.
37 // TODO(stefanocs): Update field_trials field to store hashes instead of
38 // string.
39 repeated string field_trials = 7;
40
41 // Platform
42 enum PlatformType {
43 PLATFORM_TYPE_UNSPECIFIED = 0;
44 DESKTOP_PLATFORM = 1;
45 ANDROID_PLATFORM = 2;
46 }
47
48 // Various request triggers we want to record, e.g. on page load.
49 enum RequestTrigger {
50 REQUEST_TRIGGER_UNSPECIFIED = 0;
51 ONLOAD = 1;
52 AFTER_GESTURE = 2;
53 }
54
55 // User Permission Actions. This enum is intentionally different with
56 // the one in src/chrome/browser/permissions/permission_uma_util.h
57 enum Action {
58 // TODO(stefanocs): Add ACTION_UNSPECIFIED to the corresponding Safe
59 // Browsing logs proto.
60 ACTION_UNSPECIFIED = 0;
61 GRANTED = 1;
62 DENIED = 2;
63 DISMISSED = 3;
64 IGNORED = 4;
65 REVOKED = 5;
66 }
67
68 // Places in the UI that a permission change can occur.
69 enum SourceUI {
70 SOURCE_UI_UNSPECIFIED = 0;
71 PROMPT = 1;
72 OIB = 2;
73 // TODO(stefanocs): Remove CONTENT_SETTINGS from the corresponding Safe
74 // Browsing logs proto.
75 SITE_SETTINGS = 3;
76 }
77
78 // The various types of permissions. This should stay in sync with the
79 // corresponding Safe Browsing logs enum.
80 enum PermissionType {
81 UNKNOWN_PERMISSION = 0;
82 MIDI_SYSEX = 1;
83 PUSH_MESSAGING = 2;
84 NOTIFICATIONS = 3;
85 GEOLOCATION = 4;
86 PROTECTED_MEDIA_IDENTIFIER = 5;
87 MIDI = 6;
88 DURABLE_STORAGE = 7;
89 AUDIO_CAPTURE = 8;
90 VIDEO_CAPTURE = 9;
91 }
92 }
OLDNEW
« no previous file with comments | « chrome/common/safe_browsing/BUILD.gn ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698