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

Unified Diff: webkit/plugins/npapi/webplugininfo.cc

Issue 5699005: Policy: Re-enabled plugin still disabled (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Whitespace fixes only. Trybot happiness still applies. Created 9 years, 11 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 | « webkit/plugins/npapi/webplugininfo.h ('k') | webkit/support/webkit_support.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/plugins/npapi/webplugininfo.cc
diff --git a/webkit/plugins/npapi/webplugininfo.cc b/webkit/plugins/npapi/webplugininfo.cc
index cd5a19f82d1d14f6473d605ee45d05ee2af63723..772a7d0f23f885f33ddc7c36d9870f1649913dc4 100644
--- a/webkit/plugins/npapi/webplugininfo.cc
+++ b/webkit/plugins/npapi/webplugininfo.cc
@@ -4,6 +4,8 @@
#include "webkit/plugins/npapi/webplugininfo.h"
+#include "base/logging.h"
+
namespace webkit {
namespace npapi {
@@ -11,7 +13,9 @@ WebPluginMimeType::WebPluginMimeType() {}
WebPluginMimeType::~WebPluginMimeType() {}
-WebPluginInfo::WebPluginInfo() : enabled(false) {}
+WebPluginInfo::WebPluginInfo()
+ : enabled(USER_DISABLED_POLICY_UNMANAGED) {
+}
WebPluginInfo::WebPluginInfo(const WebPluginInfo& rhs)
: name(rhs.name),
@@ -43,9 +47,13 @@ WebPluginInfo::WebPluginInfo(const string16& fake_name,
version(fake_version),
desc(fake_desc),
mime_types(),
- enabled(true) {
+ enabled(USER_ENABLED_POLICY_UNMANAGED) {
+}
+
+bool IsPluginEnabled(const WebPluginInfo& plugin) {
+ return ((plugin.enabled & WebPluginInfo::POLICY_ENABLED) ||
+ plugin.enabled == WebPluginInfo::USER_ENABLED_POLICY_UNMANAGED);
}
} // namespace npapi
} // namespace webkit
-
« no previous file with comments | « webkit/plugins/npapi/webplugininfo.h ('k') | webkit/support/webkit_support.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698