OLD | NEW |
(Empty) | |
| 1 // Copyright 2017 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 #ifndef CHROME_BROWSER_PERMISSIONS_PERMISSION_RESULT_H_ |
| 6 #define CHROME_BROWSER_PERMISSIONS_PERMISSION_RESULT_H_ |
| 7 |
| 8 #include "components/content_settings/core/common/content_settings.h" |
| 9 |
| 10 // Identifies the source or reason for a permission status being returned. This |
| 11 // enum backs an UMA histogram and must be treated as append-only. |
| 12 enum class PermissionStatusSource { |
| 13 // The reason for the status is not specified. |
| 14 UNSPECIFIED, |
| 15 |
| 16 // The status is the result of being blocked due to the user dismissing a |
| 17 // permission prompt multiple times. |
| 18 MULTIPLE_DISMISSALS, |
| 19 |
| 20 // The status is the result of being blocked because the permission is on the |
| 21 // safe browsing blacklist. |
| 22 SAFE_BROWSING_BLACKLIST, |
| 23 |
| 24 // The status is the result of being blocked by the permissions kill switch. |
| 25 KILL_SWITCH, |
| 26 }; |
| 27 |
| 28 struct PermissionResult { |
| 29 PermissionResult(ContentSetting content_setting, |
| 30 PermissionStatusSource source); |
| 31 ~PermissionResult(); |
| 32 |
| 33 ContentSetting content_setting; |
| 34 PermissionStatusSource source; |
| 35 }; |
| 36 |
| 37 #endif // CHROME_BROWSER_PERMISSIONS_PERMISSION_RESULT_H_ |
OLD | NEW |