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

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

Issue 2731083002: Stop pretending that a Flash setting of DETECT_IMPORTANT_CONTENT is ASK.
Patch Set: 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 28 matching lines...) Expand all
39 ContentSetting FlashPermissionContext::GetPermissionStatusInternal( 39 ContentSetting FlashPermissionContext::GetPermissionStatusInternal(
40 const GURL& requesting_origin, 40 const GURL& requesting_origin,
41 const GURL& embedding_origin) const { 41 const GURL& embedding_origin) const {
42 HostContentSettingsMap* host_content_settings_map = 42 HostContentSettingsMap* host_content_settings_map =
43 HostContentSettingsMapFactory::GetForProfile(profile()); 43 HostContentSettingsMapFactory::GetForProfile(profile());
44 ContentSetting flash_setting = PluginUtils::GetFlashPluginContentSetting( 44 ContentSetting flash_setting = PluginUtils::GetFlashPluginContentSetting(
45 host_content_settings_map, url::Origin(embedding_origin), 45 host_content_settings_map, url::Origin(embedding_origin),
46 requesting_origin, nullptr); 46 requesting_origin, nullptr);
47 flash_setting = PluginsFieldTrial::EffectiveContentSetting( 47 flash_setting = PluginsFieldTrial::EffectiveContentSetting(
48 host_content_settings_map, content_settings_type(), flash_setting); 48 host_content_settings_map, content_settings_type(), flash_setting);
49 if (flash_setting == CONTENT_SETTING_DETECT_IMPORTANT_CONTENT)
50 return CONTENT_SETTING_ASK;
raymes 2017/03/05 23:55:40 I'm not sure if we want to do this? Won't this hav
tommycli 2017/03/06 19:10:26 I agree. I missed that this was in FlashPermission
lgarron 2017/03/09 02:47:19 Could you explain to me what those effects are? If
raymes 2017/03/09 03:01:07 Ask means "show a prompt" in the permissions code,
51 return flash_setting; 49 return flash_setting;
52 } 50 }
53 51
54 void FlashPermissionContext::UpdateTabContext(const PermissionRequestID& id, 52 void FlashPermissionContext::UpdateTabContext(const PermissionRequestID& id,
55 const GURL& requesting_origin, 53 const GURL& requesting_origin,
56 bool allowed) { 54 bool allowed) {
57 if (!allowed) 55 if (!allowed)
58 return; 56 return;
59 57
60 content::WebContents* web_contents = 58 content::WebContents* web_contents =
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 else 94 else
97 pattern = ContentSettingsPattern::FromURLNoWildcard(embedding_origin); 95 pattern = ContentSettingsPattern::FromURLNoWildcard(embedding_origin);
98 host_content_settings_map->SetContentSettingCustomScope( 96 host_content_settings_map->SetContentSettingCustomScope(
99 pattern, ContentSettingsPattern::Wildcard(), content_settings_type(), 97 pattern, ContentSettingsPattern::Wildcard(), content_settings_type(),
100 std::string(), content_setting); 98 std::string(), content_setting);
101 } 99 }
102 100
103 bool FlashPermissionContext::IsRestrictedToSecureOrigins() const { 101 bool FlashPermissionContext::IsRestrictedToSecureOrigins() const {
104 return false; 102 return false;
105 } 103 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698