Index: chrome/browser/plugin_finder.cc |
diff --git a/chrome/browser/plugin_finder.cc b/chrome/browser/plugin_finder.cc |
index 245616922e6f77cc41e01cf623d5757f60dff7fc..a4609ed34fa74ace21a76ebd0417896b378a8383 100644 |
--- a/chrome/browser/plugin_finder.cc |
+++ b/chrome/browser/plugin_finder.cc |
@@ -130,14 +130,35 @@ PluginInstaller* PluginFinder::CreateInstaller( |
DCHECK(success); |
bool display_url = false; |
plugin_dict->GetBoolean("displayurl", &display_url); |
- bool requires_authorization = true; |
- plugin_dict->GetBoolean("requires_authorization", &requires_authorization); |
+ |
PluginInstaller* installer = new PluginInstaller(identifier, |
- GURL(url), |
- GURL(help_url), |
name, |
display_url, |
- requires_authorization); |
+ GURL(url), |
+ GURL(help_url)); |
+ ListValue* versions = NULL; |
+ if (plugin_dict->GetList("versions", &versions)) { |
+ for (ListValue::const_iterator it = versions->begin(); |
+ it != versions->end(); ++it) { |
+ DictionaryValue* version_dict = NULL; |
+ if (!(*it)->GetAsDictionary(&version_dict)) { |
+ NOTREACHED(); |
+ continue; |
+ } |
+ std::string version; |
+ success = version_dict->GetString("version", &version); |
+ DCHECK(success); |
+ std::string status_str; |
+ success = version_dict->GetString("status", &status_str); |
+ DCHECK(success); |
+ PluginInstaller::SecurityStatus status = |
+ PluginInstaller::SECURITY_STATUS_UP_TO_DATE; |
+ success = PluginInstaller::ParseSecurityStatus(status_str, &status); |
+ DCHECK(success); |
+ installer->AddVersion(Version(version), status); |
+ } |
+ } |
+ |
installers_[identifier] = installer; |
return installer; |
} |