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

Unified Diff: chrome/common/plugin_utils.cc

Issue 2356053002: [HBD] Only use Plugin Content Settings for Flash. (Closed)
Patch Set: address xhwang comments 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 | « chrome/browser/prerender/prerender_test_utils.cc ('k') | chrome/renderer/plugins/power_saver_info.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/plugin_utils.cc
diff --git a/chrome/common/plugin_utils.cc b/chrome/common/plugin_utils.cc
index 63db43e7e565848f755e81cfa08bd66e5e69d6e3..9c143751282daf3b68c4b7e956ef9b2a32066fc5 100644
--- a/chrome/common/plugin_utils.cc
+++ b/chrome/common/plugin_utils.cc
@@ -5,34 +5,19 @@
#include "chrome/common/plugin_utils.h"
#include "base/strings/utf_string_conversions.h"
+#include "content/public/common/content_constants.h"
#include "content/public/common/webplugininfo.h"
-#include "widevine_cdm_version.h" // In SHARED_INTERMEDIATE_DIR.
-
-#if !defined(DISABLE_NACL)
-#include "components/nacl/common/nacl_constants.h"
-#endif
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) {
+ if (plugin.name == base::ASCIIToUTF16(content::kFlashPluginName))
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;
+ // Since all the UI surfaces for Plugin content settings display "Flash",
+ // treat all other plugins as JavaScript. These include all of:
+ // - Internally registered plugins such as:
+ // - NaCl
+ // - Widevine
+ // - PDF
+ // - Custom plugins loaded from the command line
+ return true;
}
« no previous file with comments | « chrome/browser/prerender/prerender_test_utils.cc ('k') | chrome/renderer/plugins/power_saver_info.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698