OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 #include "chrome/browser/permissions/permission_context_base.h" | 5 #include "chrome/browser/permissions/permission_context_base.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 #include <utility> | 10 #include <utility> |
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
150 case PermissionStatusSource::MULTIPLE_IGNORES: | 150 case PermissionStatusSource::MULTIPLE_IGNORES: |
151 LogPermissionBlockedMessage(web_contents, | 151 LogPermissionBlockedMessage(web_contents, |
152 kPermissionBlockedRepeatedIgnoresMessage, | 152 kPermissionBlockedRepeatedIgnoresMessage, |
153 content_settings_type_); | 153 content_settings_type_); |
154 break; | 154 break; |
155 case PermissionStatusSource::SAFE_BROWSING_BLACKLIST: | 155 case PermissionStatusSource::SAFE_BROWSING_BLACKLIST: |
156 LogPermissionBlockedMessage(web_contents, | 156 LogPermissionBlockedMessage(web_contents, |
157 kPermissionBlockedBlacklistMessage, | 157 kPermissionBlockedBlacklistMessage, |
158 content_settings_type_); | 158 content_settings_type_); |
159 break; | 159 break; |
| 160 case PermissionStatusSource::INSECURE_ORIGIN: |
| 161 case PermissionStatusSource::ENTERPRISE_POLICY: |
| 162 case PermissionStatusSource::EXTENSION: |
160 case PermissionStatusSource::UNSPECIFIED: | 163 case PermissionStatusSource::UNSPECIFIED: |
161 break; | 164 break; |
162 } | 165 } |
163 | 166 |
164 // If we are under embargo, record the embargo reason for which we have | 167 // If we are under embargo, record the embargo reason for which we have |
165 // suppressed the prompt. | 168 // suppressed the prompt. |
166 PermissionUmaUtil::RecordEmbargoPromptSuppressionFromSource(result.source); | 169 PermissionUmaUtil::RecordEmbargoPromptSuppressionFromSource(result.source); |
167 NotifyPermissionSet(id, requesting_origin, embedding_origin, callback, | 170 NotifyPermissionSet(id, requesting_origin, embedding_origin, callback, |
168 false /* persist */, result.content_setting); | 171 false /* persist */, result.content_setting); |
169 return; | 172 return; |
(...skipping 312 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
482 // Default to ignoring the feature policy. | 485 // Default to ignoring the feature policy. |
483 return true; | 486 return true; |
484 } | 487 } |
485 | 488 |
486 // Some features don't have an associated feature policy yet. Allow those. | 489 // Some features don't have an associated feature policy yet. Allow those. |
487 if (feature_policy_feature_ == blink::WebFeaturePolicyFeature::kNotFound) | 490 if (feature_policy_feature_ == blink::WebFeaturePolicyFeature::kNotFound) |
488 return true; | 491 return true; |
489 | 492 |
490 return rfh->IsFeatureEnabled(feature_policy_feature_); | 493 return rfh->IsFeatureEnabled(feature_policy_feature_); |
491 } | 494 } |
OLD | NEW |