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

Unified Diff: chrome/browser/plugin_data_remover.cc

Issue 7497030: PluginList cleanup (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix crash Created 9 years, 5 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/metrics/metrics_service.cc ('k') | chrome/browser/plugin_data_remover_helper.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/plugin_data_remover.cc
diff --git a/chrome/browser/plugin_data_remover.cc b/chrome/browser/plugin_data_remover.cc
index ac5a5cfdf04566d2604e63ca1cd58451172a901e..e17254e763163a43daa933325a8c547bc103ac5f 100644
--- a/chrome/browser/plugin_data_remover.cc
+++ b/chrome/browser/plugin_data_remover.cc
@@ -168,20 +168,20 @@ void PluginDataRemover::SignalDone() {
bool PluginDataRemover::IsSupported() {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE));
bool allow_wildcard = false;
- webkit::npapi::WebPluginInfo plugin;
- std::string mime_type;
- if (!webkit::npapi::PluginList::Singleton()->GetPluginInfo(
- GURL(), kFlashMimeType, allow_wildcard, &plugin, &mime_type)) {
+ std::vector<webkit::npapi::WebPluginInfo> plugins;
+ webkit::npapi::PluginList::Singleton()->GetPluginInfoArray(
+ GURL(), kFlashMimeType, allow_wildcard, NULL, &plugins, NULL);
+ std::vector<webkit::npapi::WebPluginInfo>::iterator plugin = plugins.begin();
+ if (plugin == plugins.end())
return false;
- }
scoped_ptr<Version> version(
- webkit::npapi::PluginGroup::CreateVersionFromString(plugin.version));
+ webkit::npapi::PluginGroup::CreateVersionFromString(plugin->version));
scoped_ptr<Version> min_version(Version::GetVersionFromString(
CommandLine::ForCurrentProcess()->GetSwitchValueASCII(
switches::kMinClearSiteDataFlashVersion)));
if (!min_version.get())
min_version.reset(Version::GetVersionFromString(kMinFlashVersion));
- return webkit::npapi::IsPluginEnabled(plugin) &&
+ return webkit::npapi::IsPluginEnabled(*plugin) &&
version.get() &&
min_version->CompareTo(*version) == -1;
}
« no previous file with comments | « chrome/browser/metrics/metrics_service.cc ('k') | chrome/browser/plugin_data_remover_helper.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698