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

Unified Diff: content/browser/plugin_data_remover_impl.cc

Issue 10351013: Return a list of plugins that support clearing site data instead of the first one. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: comment Created 8 years, 8 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/plugin_data_remover_helper.cc ('k') | content/public/browser/plugin_data_remover.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/plugin_data_remover_impl.cc
diff --git a/content/browser/plugin_data_remover_impl.cc b/content/browser/plugin_data_remover_impl.cc
index f4eab9f809b8a2b9077c5fd1dd5b3da40085c412..7b34c9b17fd5fdd12c03ba2327e23735c2253be5 100644
--- a/content/browser/plugin_data_remover_impl.cc
+++ b/content/browser/plugin_data_remover_impl.cc
@@ -39,22 +39,21 @@ PluginDataRemover* PluginDataRemover::Create(BrowserContext* browser_context) {
}
// static
-bool PluginDataRemover::IsSupported(webkit::WebPluginInfo* plugin) {
+void PluginDataRemover::GetSupportedPlugins(
+ std::vector<webkit::WebPluginInfo>* supported_plugins) {
bool allow_wildcard = false;
std::vector<webkit::WebPluginInfo> plugins;
PluginService::GetInstance()->GetPluginInfoArray(
GURL(), kFlashMimeType, allow_wildcard, &plugins, NULL);
- std::vector<webkit::WebPluginInfo>::iterator plugin_it = plugins.begin();
- if (plugin_it == plugins.end())
- return false;
- scoped_ptr<Version> version(
- webkit::npapi::PluginGroup::CreateVersionFromString(plugin_it->version));
scoped_ptr<Version> min_version(
Version::GetVersionFromString(kMinFlashVersion));
- bool rv = version.get() && min_version->CompareTo(*version) == -1;
- if (rv)
- *plugin = *plugin_it;
- return rv;
+ for (std::vector<webkit::WebPluginInfo>::iterator it = plugins.begin();
+ it != plugins.end(); ++it) {
+ scoped_ptr<Version> version(
+ webkit::npapi::PluginGroup::CreateVersionFromString(it->version));
+ if (version.get() && min_version->CompareTo(*version) == -1)
+ supported_plugins->push_back(*it);
+ }
}
class PluginDataRemoverImpl::Context
« no previous file with comments | « chrome/browser/plugin_data_remover_helper.cc ('k') | content/public/browser/plugin_data_remover.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698