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