Chromium Code Reviews| 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; |
|
jochen (gone - plz use gerrit)
2012/05/18 18:48:18
would it be safer to default to not up to date, as
Bernhard Bauer
2012/05/21 10:52:27
A parse error is one of those "should never happen
|
| + success = PluginInstaller::ParseSecurityStatus(status_str, &status); |
| + DCHECK(success); |
| + installer->AddVersion(Version(version), status); |
| + } |
| + } |
| + |
| installers_[identifier] = installer; |
| return installer; |
| } |