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

Side by Side Diff: chrome/browser/permissions/permission_result.h

Issue 2936003003: MD Settings: Set all content setting values in Site Details Javascript. (Closed)
Patch Set: Review comments, tests & cleanup. Created 3 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
OLDNEW
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. 10 // Identifies the source or reason for a permission status being returned.
11 enum class PermissionStatusSource { 11 enum class PermissionStatusSource {
12 // The reason for the status is not specified. 12 // The reason for the status is not specified.
13 UNSPECIFIED, 13 UNSPECIFIED,
14 14
15 // 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
16 // safe browsing blacklist. 16 // safe browsing blacklist.
17 SAFE_BROWSING_BLACKLIST, 17 SAFE_BROWSING_BLACKLIST,
18 18
19 // 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.
20 KILL_SWITCH, 20 KILL_SWITCH,
21 21
22 // The status is the result of being blocked due to the user dismissing a 22 // The status is the result of being blocked due to the user dismissing a
23 // permission prompt multiple times. 23 // permission prompt multiple times.
24 MULTIPLE_DISMISSALS, 24 MULTIPLE_DISMISSALS,
25 25
26 // The status is the result of being blocked due to the user ignoring a 26 // The status is the result of being blocked due to the user ignoring a
27 // permission prompt multiple times. 27 // permission prompt multiple times.
28 MULTIPLE_IGNORES, 28 MULTIPLE_IGNORES,
29
30 // TODO(patricialor): The following PermissionStatusSources are not yet
31 // implemented.
32
33 // This origin is insecure, thus its access to some permissions has been
34 // restricted, such as camera, microphone, etc.
35 INSECURE_ORIGIN,
36
37 // The following two PermissionStatusSources are set for when the permission
38 // is being controlled for a individual origin, or are part of a group of
39 // origins controlled via a URL pattern, e.g. "https://*".
40
41 // Controlled by enterprise policy.
42 ENTERPRISE_POLICY,
43
44 // Controlled by an extension.
45 EXTENSION,
29 }; 46 };
30 47
31 struct PermissionResult { 48 struct PermissionResult {
32 PermissionResult(ContentSetting content_setting, 49 PermissionResult(ContentSetting content_setting,
33 PermissionStatusSource source); 50 PermissionStatusSource source);
34 ~PermissionResult(); 51 ~PermissionResult();
35 52
36 ContentSetting content_setting; 53 ContentSetting content_setting;
37 PermissionStatusSource source; 54 PermissionStatusSource source;
38 }; 55 };
39 56
40 #endif // CHROME_BROWSER_PERMISSIONS_PERMISSION_RESULT_H_ 57 #endif // CHROME_BROWSER_PERMISSIONS_PERMISSION_RESULT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698