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

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

Issue 6350010: Put some plug-ins behind an infobar, where they have:... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' 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
Index: webkit/plugins/npapi/plugin_group.cc
===================================================================
--- webkit/plugins/npapi/plugin_group.cc (revision 72559)
+++ webkit/plugins/npapi/plugin_group.cc (working copy)
@@ -18,6 +18,9 @@
const char* PluginGroup::kAdobeReaderGroupName = "Adobe Reader";
const char* PluginGroup::kAdobeReaderUpdateURL = "http://get.adobe.com/reader/";
+const char* PluginGroup::kJavaGroupName = "Java";
+const char* PluginGroup::kQuickTimeGroupName = "QuickTime";
+const char* PluginGroup::kShockwaveGroupName = "Shockwave";
/*static*/
std::set<string16>* PluginGroup::policy_disabled_plugin_patterns_;
@@ -50,7 +53,8 @@
VersionRange::VersionRange(VersionRangeDefinition definition)
: low_str(definition.version_matcher_low),
high_str(definition.version_matcher_high),
- min_str(definition.min_version) {
+ min_str(definition.min_version),
+ requires_authorization(definition.requires_authorization) {
if (!low_str.empty())
low.reset(Version::GetVersionFromString(low_str));
if (!high_str.empty())
@@ -77,6 +81,7 @@
low.reset(Version::GetVersionFromString(other.low_str));
high.reset(Version::GetVersionFromString(other.high_str));
min.reset(Version::GetVersionFromString(other.min_str));
+ requires_authorization = other.requires_authorization;
}
PluginGroup::PluginGroup(const string16& group_name,
@@ -401,6 +406,15 @@
return false;
}
+bool PluginGroup::RequiresAuthorization() const {
+ for (size_t i = 0; i < version_ranges_.size(); ++i) {
+ if (IsVersionInRange(*version_, version_ranges_[i]) &&
+ version_ranges_[i].requires_authorization)
+ return true;
+ }
+ return false;
+}
+
bool PluginGroup::IsEmpty() const {
return web_plugin_infos_.size() == 0;
}

Powered by Google App Engine
This is Rietveld 408576698