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

Side by Side Diff: chrome/browser/plugins/flash_permission_context.cc

Issue 2723983004: Add PermissionManager::GetPermissionStatusForFrame function (Closed)
Patch Set: Add PermissionManager::GetPermissionStatusForFrame function Created 3 years, 9 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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/plugins/flash_permission_context.h" 5 #include "chrome/browser/plugins/flash_permission_context.h"
6 6
7 #include "chrome/browser/content_settings/host_content_settings_map_factory.h" 7 #include "chrome/browser/content_settings/host_content_settings_map_factory.h"
8 #include "chrome/browser/permissions/permission_request_id.h" 8 #include "chrome/browser/permissions/permission_request_id.h"
9 #include "chrome/browser/plugins/flash_temporary_permission_tracker.h" 9 #include "chrome/browser/plugins/flash_temporary_permission_tracker.h"
10 #include "chrome/browser/plugins/plugin_utils.h" 10 #include "chrome/browser/plugins/plugin_utils.h"
(...skipping 19 matching lines...) Expand all
30 30
31 } // namespace 31 } // namespace
32 32
33 FlashPermissionContext::FlashPermissionContext(Profile* profile) 33 FlashPermissionContext::FlashPermissionContext(Profile* profile)
34 : PermissionContextBase(profile, 34 : PermissionContextBase(profile,
35 CONTENT_SETTINGS_TYPE_PLUGINS) {} 35 CONTENT_SETTINGS_TYPE_PLUGINS) {}
36 36
37 FlashPermissionContext::~FlashPermissionContext() {} 37 FlashPermissionContext::~FlashPermissionContext() {}
38 38
39 ContentSetting FlashPermissionContext::GetPermissionStatusInternal( 39 ContentSetting FlashPermissionContext::GetPermissionStatusInternal(
40 content::RenderFrameHost* render_frame_host,
40 const GURL& requesting_origin, 41 const GURL& requesting_origin,
41 const GURL& embedding_origin) const { 42 const GURL& embedding_origin) const {
42 HostContentSettingsMap* host_content_settings_map = 43 HostContentSettingsMap* host_content_settings_map =
43 HostContentSettingsMapFactory::GetForProfile(profile()); 44 HostContentSettingsMapFactory::GetForProfile(profile());
44 ContentSetting flash_setting = PluginUtils::GetFlashPluginContentSetting( 45 ContentSetting flash_setting = PluginUtils::GetFlashPluginContentSetting(
45 host_content_settings_map, url::Origin(embedding_origin), 46 host_content_settings_map, url::Origin(embedding_origin),
46 requesting_origin, nullptr); 47 requesting_origin, nullptr);
47 flash_setting = PluginsFieldTrial::EffectiveContentSetting( 48 flash_setting = PluginsFieldTrial::EffectiveContentSetting(
48 host_content_settings_map, content_settings_type(), flash_setting); 49 host_content_settings_map, content_settings_type(), flash_setting);
49 if (flash_setting == CONTENT_SETTING_DETECT_IMPORTANT_CONTENT) 50 if (flash_setting == CONTENT_SETTING_DETECT_IMPORTANT_CONTENT)
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 else 97 else
97 pattern = ContentSettingsPattern::FromURLNoWildcard(embedding_origin); 98 pattern = ContentSettingsPattern::FromURLNoWildcard(embedding_origin);
98 host_content_settings_map->SetContentSettingCustomScope( 99 host_content_settings_map->SetContentSettingCustomScope(
99 pattern, ContentSettingsPattern::Wildcard(), content_settings_type(), 100 pattern, ContentSettingsPattern::Wildcard(), content_settings_type(),
100 std::string(), content_setting); 101 std::string(), content_setting);
101 } 102 }
102 103
103 bool FlashPermissionContext::IsRestrictedToSecureOrigins() const { 104 bool FlashPermissionContext::IsRestrictedToSecureOrigins() const {
104 return false; 105 return false;
105 } 106 }
OLDNEW
« no previous file with comments | « chrome/browser/plugins/flash_permission_context.h ('k') | chrome/browser/storage/durable_storage_permission_context.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698