OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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_util.h" | 5 #include "chrome/browser/permissions/permission_util.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "chrome/browser/content_settings/host_content_settings_map_factory.h" | 8 #include "chrome/browser/content_settings/host_content_settings_map_factory.h" |
9 #include "chrome/browser/permissions/permission_uma_util.h" | 9 #include "chrome/browser/permissions/permission_uma_util.h" |
10 #include "components/content_settings/core/browser/host_content_settings_map.h" | 10 #include "components/content_settings/core/browser/host_content_settings_map.h" |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
89 resource_identifier, setting); | 89 resource_identifier, setting); |
90 | 90 |
91 ContentSetting final_value = map->GetContentSetting( | 91 ContentSetting final_value = map->GetContentSetting( |
92 primary_url, secondary_url, content_type, resource_identifier); | 92 primary_url, secondary_url, content_type, resource_identifier); |
93 | 93 |
94 if (previous_value == CONTENT_SETTING_ALLOW && | 94 if (previous_value == CONTENT_SETTING_ALLOW && |
95 final_value != CONTENT_SETTING_ALLOW) { | 95 final_value != CONTENT_SETTING_ALLOW) { |
96 PermissionType permission_type; | 96 PermissionType permission_type; |
97 if (PermissionUtil::GetPermissionType(content_type, &permission_type)) { | 97 if (PermissionUtil::GetPermissionType(content_type, &permission_type)) { |
98 PermissionUmaUtil::PermissionRevoked(permission_type, primary_url, | 98 PermissionUmaUtil::PermissionRevoked(permission_type, primary_url, |
99 profile); | 99 SITE_SETTINGS, profile); |
100 } | 100 } |
101 } | 101 } |
102 } | 102 } |
OLD | NEW |