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

Side by Side Diff: chrome/browser/permissions/permission_util.cc

Issue 2707383004: Remove redundant GetPermissionType call in ~ScopedRevocationReporter (Closed)
Patch Set: Created 3 years, 10 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698