Chromium Code Reviews| Index: chrome/common/safe_browsing/permission_report.proto |
| diff --git a/chrome/common/safe_browsing/permission_report.proto b/chrome/common/safe_browsing/permission_report.proto |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..83e45910995aba9901f0eb9c50993aa477cdf2f3 |
| --- /dev/null |
| +++ b/chrome/common/safe_browsing/permission_report.proto |
| @@ -0,0 +1,85 @@ |
| +// Copyright 2016 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +// Protocol buffer for permission reports sent to the safe browsing client-side |
| +// detection (CSD) frontends. |
| + |
| +syntax = "proto2"; |
| + |
| +option optimize_for = LITE_RUNTIME; |
| + |
| +package safe_browsing; |
| + |
| +// A single Permission Report sent to Safe Browsing client-side detection |
| +// frontends. |
| +message PermissionReport { |
| + // The origin (scheme/host/port) of the site requesting the permission. |
| + optional string origin = 1; |
| + |
| + // The permission being requested/acted upon. |
| + optional PermissionType permission = 2; |
| + |
| + // The platform. |
| + optional PlatformType platform_type = 3; |
| + |
| + // When the request was initiated. |
| + repeated RequestTrigger request_trigger = 4; |
| + |
| + // The action the user took. Required. |
| + optional Action action = 5; |
| + |
| + // The UI used to complete the action. |
| + optional SourceUI source_ui = 6; |
| + |
| + // The relevant field trials enabled for this report. |
| + repeated string field_trials = 7; |
|
Nathan Parker
2016/05/25 21:13:02
Once you figure out what form the field trial stri
kcarattini
2016/05/26 01:53:26
Stefano, please add a TOTO in here to update the f
stefanocs
2016/05/26 03:13:37
Done.
|
| + |
| + // Platform |
| + enum PlatformType { |
| + PLATFORM_TYPE_UNSPECIFIED = 0; |
| + DESKTOP = 1; |
| + ANDROID = 2; |
| + } |
| + |
| + // Various request triggers we want to record, e.g. on page load. |
| + enum RequestTrigger { |
| + REQUEST_TRIGGER_UNSPECIFIED = 0; |
| + ONLOAD = 1; |
| + AFTER_GESTURE = 2; |
| + } |
| + |
| + // User Permission Actions |
| + enum Action { |
| + GRANTED = 0; |
|
Nathan Parker
2016/05/25 21:13:02
I have a theory, not sure if it's a good one, that
kcarattini
2016/05/26 01:53:26
I don't disagree with you in theory, but in this c
kcarattini
2016/05/26 03:02:48
Just had a lengthy discussion about PB enums! I ag
stefanocs
2016/05/26 03:13:37
Done.
|
| + DENIED = 1; |
| + DISMISSED = 2; |
| + IGNORED = 3; |
| + REVOKED = 4; |
| + } |
| + |
| + // Places in the UI that a permission change can occur. |
| + enum SourceUI { |
| + SOURCE_UI_UNSPECIFIED = 0; |
| + PROMPT = 1; |
| + OIB = 2; |
| + // TODO(stefanocs): Remove CONTENT_SETTINGS from the corresponding Safe |
| + // Browsing logs proto. |
| + SITE_SETTINGS = 3; |
| + } |
| + |
| + // The various types of permissions. This should stay in sync with the |
| + // corresponding Safe Browsing logs enum. |
|
Nathan Parker
2016/05/25 21:13:02
How about a comment up top to make it easy for peo
kcarattini
2016/05/26 01:53:26
Do we usually put pointers into google3 code in ch
stefanocs
2016/05/26 06:48:25
Done.
|
| + enum PermissionType { |
| + UNKNOWN_PERMISSION = 0; |
| + MIDI_SYSEX = 1; |
| + PUSH_MESSAGING = 2; |
| + NOTIFICATIONS = 3; |
| + GEOLOCATION = 4; |
| + PROTECTED_MEDIA_IDENTIFIER = 5; |
| + MIDI = 6; |
| + DURABLE_STORAGE = 7; |
| + AUDIO_CAPTURE = 8; |
| + VIDEO_CAPTURE = 9; |
| + } |
| +} |