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

Unified Diff: chrome/browser/plugin_finder.cc

Issue 10263022: Move version metadata from PluginGroup into PluginInstaller. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: review Created 8 years, 7 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: 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;
}
« no previous file with comments | « chrome/browser/extensions/api/content_settings/content_settings_apitest.cc ('k') | chrome/browser/plugin_finder_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698