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

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

Issue 2898663002: Implement feature policy checks in the browser process (Closed)
Patch Set: Implement feature policy checks in the browser process Created 3 years, 6 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 14 matching lines...) Expand all
25 std::string provider_id; 25 std::string provider_id;
26 host_content_settings_map->GetDefaultContentSetting( 26 host_content_settings_map->GetDefaultContentSetting(
27 CONTENT_SETTINGS_TYPE_PLUGINS, &provider_id); 27 CONTENT_SETTINGS_TYPE_PLUGINS, &provider_id);
28 return provider_id == site_settings::kPolicyProviderId; 28 return provider_id == site_settings::kPolicyProviderId;
29 } 29 }
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 blink::WebFeaturePolicyFeature::kNotFound) {}
36 37
37 FlashPermissionContext::~FlashPermissionContext() {} 38 FlashPermissionContext::~FlashPermissionContext() {}
38 39
39 ContentSetting FlashPermissionContext::GetPermissionStatusInternal( 40 ContentSetting FlashPermissionContext::GetPermissionStatusInternal(
40 content::RenderFrameHost* render_frame_host, 41 content::RenderFrameHost* render_frame_host,
41 const GURL& requesting_origin, 42 const GURL& requesting_origin,
42 const GURL& embedding_origin) const { 43 const GURL& embedding_origin) const {
43 HostContentSettingsMap* host_content_settings_map = 44 HostContentSettingsMap* host_content_settings_map =
44 HostContentSettingsMapFactory::GetForProfile(profile()); 45 HostContentSettingsMapFactory::GetForProfile(profile());
45 ContentSetting flash_setting = PluginUtils::GetFlashPluginContentSetting( 46 ContentSetting flash_setting = PluginUtils::GetFlashPluginContentSetting(
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 else 98 else
98 pattern = ContentSettingsPattern::FromURLNoWildcard(embedding_origin); 99 pattern = ContentSettingsPattern::FromURLNoWildcard(embedding_origin);
99 host_content_settings_map->SetContentSettingCustomScope( 100 host_content_settings_map->SetContentSettingCustomScope(
100 pattern, ContentSettingsPattern::Wildcard(), content_settings_type(), 101 pattern, ContentSettingsPattern::Wildcard(), content_settings_type(),
101 std::string(), content_setting); 102 std::string(), content_setting);
102 } 103 }
103 104
104 bool FlashPermissionContext::IsRestrictedToSecureOrigins() const { 105 bool FlashPermissionContext::IsRestrictedToSecureOrigins() const {
105 return false; 106 return false;
106 } 107 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698