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

Unified Diff: webkit/plugins/webplugininfo.cc

Issue 7901015: Revert 101269 - Store plug-in enabled/disabled state in PluginPrefs instead of WebPluginInfo, to ... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 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 | « webkit/plugins/webplugininfo.h ('k') | webkit/support/webkit_support_glue.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/plugins/webplugininfo.cc
===================================================================
--- webkit/plugins/webplugininfo.cc (revision 101271)
+++ webkit/plugins/webplugininfo.cc (working copy)
@@ -22,7 +22,8 @@
WebPluginMimeType::~WebPluginMimeType() {}
-WebPluginInfo::WebPluginInfo() : type(PLUGIN_TYPE_NPAPI) {
+WebPluginInfo::WebPluginInfo()
+ : enabled(USER_DISABLED_POLICY_UNMANAGED), type(PLUGIN_TYPE_NPAPI) {
}
WebPluginInfo::WebPluginInfo(const WebPluginInfo& rhs)
@@ -31,6 +32,7 @@
version(rhs.version),
desc(rhs.desc),
mime_types(rhs.mime_types),
+ enabled(rhs.enabled),
type(rhs.type) {
}
@@ -42,6 +44,7 @@
version = rhs.version;
desc = rhs.desc;
mime_types = rhs.mime_types;
+ enabled = rhs.enabled;
type = rhs.type;
return *this;
}
@@ -55,9 +58,15 @@
version(fake_version),
desc(fake_desc),
mime_types(),
+ enabled(USER_ENABLED_POLICY_UNMANAGED),
type(PLUGIN_TYPE_NPAPI) {
}
+bool IsPluginEnabled(const WebPluginInfo& plugin) {
+ return ((plugin.enabled & WebPluginInfo::POLICY_ENABLED) ||
+ plugin.enabled == WebPluginInfo::USER_ENABLED_POLICY_UNMANAGED);
+}
+
bool IsPepperPlugin(const WebPluginInfo& plugin) {
return ((plugin.type == WebPluginInfo::PLUGIN_TYPE_PEPPER_IN_PROCESS ) ||
plugin.type == WebPluginInfo::PLUGIN_TYPE_PEPPER_OUT_OF_PROCESS);
Property changes on: webkit/plugins/webplugininfo.cc
___________________________________________________________________
Added: svn:mergeinfo
Merged /branches/chrome_webkit_merge_branch/src/webkit/plugins/webplugininfo.cc:r3734-4217,4606-5108,5177-5263
« no previous file with comments | « webkit/plugins/webplugininfo.h ('k') | webkit/support/webkit_support_glue.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698