| OLD | NEW |
| 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/plugin_utils.h" | 5 #include "chrome/browser/plugins/plugin_utils.h" |
| 6 | 6 |
| 7 #include "base/values.h" | 7 #include "base/values.h" |
| 8 #include "chrome/common/chrome_features.h" | 8 #include "chrome/common/chrome_features.h" |
| 9 #include "chrome/common/plugin_utils.h" | 9 #include "chrome/common/plugin_utils.h" |
| 10 #include "components/content_settings/core/browser/host_content_settings_map.h" | 10 #include "components/content_settings/core/browser/host_content_settings_map.h" |
| 11 #include "components/content_settings/core/common/content_settings_types.h" | 11 #include "components/content_settings/core/common/content_settings_types.h" |
| 12 #include "components/content_settings/core/common/content_settings_utils.h" |
| 12 #include "content/public/common/webplugininfo.h" | 13 #include "content/public/common/webplugininfo.h" |
| 13 #include "url/gurl.h" | 14 #include "url/gurl.h" |
| 14 #include "url/origin.h" | 15 #include "url/origin.h" |
| 15 | 16 |
| 16 namespace { | 17 namespace { |
| 17 | 18 |
| 18 const char kFlashPluginID[] = "adobe-flash-player"; | 19 const char kFlashPluginID[] = "adobe-flash-player"; |
| 19 | 20 |
| 20 void GetPluginContentSettingInternal( | 21 void GetPluginContentSettingInternal( |
| 21 const HostContentSettingsMap* host_content_settings_map, | 22 const HostContentSettingsMap* host_content_settings_map, |
| (...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 107 main_frame_origin, plugin_url, kFlashPluginID, | 108 main_frame_origin, plugin_url, kFlashPluginID, |
| 108 &plugin_setting, nullptr, is_managed); | 109 &plugin_setting, nullptr, is_managed); |
| 109 return plugin_setting; | 110 return plugin_setting; |
| 110 } | 111 } |
| 111 | 112 |
| 112 // static | 113 // static |
| 113 bool PluginUtils::ShouldPreferHtmlOverPlugins( | 114 bool PluginUtils::ShouldPreferHtmlOverPlugins( |
| 114 const HostContentSettingsMap* host_content_settings_map) { | 115 const HostContentSettingsMap* host_content_settings_map) { |
| 115 return base::FeatureList::IsEnabled(features::kPreferHtmlOverPlugins); | 116 return base::FeatureList::IsEnabled(features::kPreferHtmlOverPlugins); |
| 116 } | 117 } |
| OLD | NEW |