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

Unified Diff: chrome/browser/plugin_finder.cc

Issue 10823434: [6] Moves CreateVersionFromString to plugin_utils and updates the callers. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: 2nd CL in series to delete PluginGroup. Created 8 years, 4 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 59a5052950cf60ac6ac7d8b85a1689af4106de23..2238c031d478446f5ef15add0b80d5da573bd50e 100644
--- a/chrome/browser/plugin_finder.cc
+++ b/chrome/browser/plugin_finder.cc
@@ -8,6 +8,7 @@
#include "base/json/json_reader.h"
#include "base/message_loop.h"
#include "base/stl_util.h"
+#include "base/string_util.h"
#include "base/values.h"
#include "chrome/browser/browser_process.h"
#include "chrome/browser/plugin_installer.h"
@@ -129,12 +130,15 @@ PluginInstaller* PluginFinder::CreateInstaller(
DCHECK(success);
bool display_url = false;
plugin_dict->GetBoolean("displayurl", &display_url);
-
+ string16 group_name_matcher;
+ success = plugin_dict->GetString("group_name_matcher", &group_name_matcher);
+ DCHECK(success);
PluginInstaller* installer = new PluginInstaller(identifier,
name,
display_url,
GURL(url),
- GURL(help_url));
+ GURL(help_url),
+ group_name_matcher);
const ListValue* versions = NULL;
if (plugin_dict->GetList("versions", &versions)) {
for (ListValue::const_iterator it = versions->begin();
@@ -161,3 +165,14 @@ PluginInstaller* PluginFinder::CreateInstaller(
installers_[identifier] = installer;
return installer;
}
+
+// Note: this method triggers the lazy initialization for all PluginInstallers.
Bernhard Bauer 2012/08/21 19:14:52 It doesn't matter very much, but what I meant orig
+const std::map<std::string, PluginInstaller*>&
+PluginFinder::GetAllPluginInstallers() {
+ for (DictionaryValue::Iterator plugin_it(*plugin_list_);
+ plugin_it.HasNext(); plugin_it.Advance()) {
+ FindPluginWithIdentifier(plugin_it.key());
+ }
+
+ return installers_;
+}

Powered by Google App Engine
This is Rietveld 408576698