Chromium Code Reviews| Index: chrome/common/safe_browsing/permission_extension.proto |
| diff --git a/chrome/common/safe_browsing/permission_extension.proto b/chrome/common/safe_browsing/permission_extension.proto |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..b5a9e0221af66adb1a8445e0365c723173c8bcc5 |
| --- /dev/null |
| +++ b/chrome/common/safe_browsing/permission_extension.proto |
| @@ -0,0 +1,88 @@ |
| +// 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 PermissionReportExtension { |
| + // 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; |
| + |
| + // 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; |
| + 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. |
| + enum PermissionType { |
| + // Unknown/invalid API. The zero-index is used in practice to represent |
| + // disabling of all APIs for a given full hash. |
|
kcarattini
2016/05/25 00:21:29
The comment isn't relevant in this context, please
stefanocs
2016/05/25 00:38:32
Done.
|
| + UNKNOWN_PERMISSION = 0; |
| + |
|
kcarattini
2016/05/25 00:21:29
remove extra line
stefanocs
2016/05/25 00:38:32
Done.
|
| + 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; |
| + } |
| +} |