| 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 "build/build_config.h" | 7 #include "build/build_config.h" |
| 8 #include "base/feature_list.h" | 8 #include "base/feature_list.h" |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "chrome/browser/content_settings/host_content_settings_map_factory.h" | 10 #include "chrome/browser/content_settings/host_content_settings_map_factory.h" |
| (...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 187 source_ui) {} | 187 source_ui) {} |
| 188 | 188 |
| 189 PermissionUtil::ScopedRevocationReporter::~ScopedRevocationReporter() { | 189 PermissionUtil::ScopedRevocationReporter::~ScopedRevocationReporter() { |
| 190 if (!is_initially_allowed_) | 190 if (!is_initially_allowed_) |
| 191 return; | 191 return; |
| 192 HostContentSettingsMap* settings_map = | 192 HostContentSettingsMap* settings_map = |
| 193 HostContentSettingsMapFactory::GetForProfile(profile_); | 193 HostContentSettingsMapFactory::GetForProfile(profile_); |
| 194 ContentSetting final_content_setting = settings_map->GetContentSetting( | 194 ContentSetting final_content_setting = settings_map->GetContentSetting( |
| 195 primary_url_, secondary_url_, content_type_, std::string()); | 195 primary_url_, secondary_url_, content_type_, std::string()); |
| 196 if (final_content_setting != CONTENT_SETTING_ALLOW) { | 196 if (final_content_setting != CONTENT_SETTING_ALLOW) { |
| 197 PermissionType permission_type; | 197 PermissionUmaUtil::PermissionRevoked(content_type_, source_ui_, |
| 198 if (PermissionUtil::GetPermissionType(content_type_, &permission_type)) { | 198 primary_url_, profile_); |
| 199 PermissionUmaUtil::PermissionRevoked(content_type_, source_ui_, | |
| 200 primary_url_, profile_); | |
| 201 } | |
| 202 } | 199 } |
| 203 } | 200 } |
| OLD | NEW |