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

Unified Diff: chrome/browser/plugins/plugin_utils.cc

Issue 2367553002: [HBD] Merge two identical ShouldUseJavaScriptSettingForPlugin impls (Closed)
Patch Set: update comment Created 4 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/common/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/plugins/plugin_utils.cc
diff --git a/chrome/browser/plugins/plugin_utils.cc b/chrome/browser/plugins/plugin_utils.cc
index bdf177b1aa6dc0a0e91940666dca568258fcbc91..961931966073cd32cae64c53448b10caae105c37 100644
--- a/chrome/browser/plugins/plugin_utils.cc
+++ b/chrome/browser/plugins/plugin_utils.cc
@@ -4,47 +4,16 @@
#include "chrome/browser/plugins/plugin_utils.h"
-#include "base/strings/utf_string_conversions.h"
#include "base/values.h"
+#include "chrome/common/plugin_utils.h"
#include "components/content_settings/core/browser/host_content_settings_map.h"
#include "content/public/common/webplugininfo.h"
#include "url/gurl.h"
-#include "widevine_cdm_version.h" // In SHARED_INTERMEDIATE_DIR.
-
-#if !defined(DISABLE_NACL)
-#include "components/nacl/common/nacl_constants.h"
-#endif
namespace {
const char kFlashPluginID[] = "adobe-flash-player";
-// For certain sandboxed Pepper plugins, use the JavaScript Content Settings.
-bool ShouldUseJavaScriptSettingForPlugin(const content::WebPluginInfo& plugin) {
- if (plugin.type != content::WebPluginInfo::PLUGIN_TYPE_PEPPER_IN_PROCESS &&
- plugin.type !=
- content::WebPluginInfo::PLUGIN_TYPE_PEPPER_OUT_OF_PROCESS) {
- return false;
- }
-
-#if !defined(DISABLE_NACL)
- // Treat Native Client invocations like JavaScript.
- if (plugin.name == base::ASCIIToUTF16(nacl::kNaClPluginName))
- return true;
-#endif
-
-#if defined(WIDEVINE_CDM_AVAILABLE) && defined(ENABLE_PEPPER_CDMS)
- // Treat CDM invocations like JavaScript.
- if (plugin.name == base::ASCIIToUTF16(kWidevineCdmDisplayName)) {
- DCHECK_EQ(content::WebPluginInfo::PLUGIN_TYPE_PEPPER_OUT_OF_PROCESS,
- plugin.type);
- return true;
- }
-#endif // defined(WIDEVINE_CDM_AVAILABLE) && defined(ENABLE_PEPPER_CDMS)
-
- return false;
-}
-
void GetPluginContentSettingInternal(
const HostContentSettingsMap* host_content_settings_map,
bool use_javascript_setting,
« no previous file with comments | « no previous file | chrome/common/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698