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

Unified Diff: chrome/browser/plugin_finder.h

Issue 10881002: [2] Adding a method to PluginFinder to get a PluginInstaller by WebPluginInfo. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Fixed bug in PluginFinder#GetPluginInstaller#Line224 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
« no previous file with comments | « no previous file | chrome/browser/plugin_finder.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/plugin_finder.h
diff --git a/chrome/browser/plugin_finder.h b/chrome/browser/plugin_finder.h
index f0d75d5c10acbe6612852b7b1fd304e0e8923496..648de3394dc33a050792f60a391f65f6dd684e79 100644
--- a/chrome/browser/plugin_finder.h
+++ b/chrome/browser/plugin_finder.h
@@ -10,9 +10,11 @@
#include "base/callback.h"
#include "base/gtest_prod_util.h"
+#include "base/hash_tables.h"
#include "base/memory/scoped_ptr.h"
#include "base/memory/singleton.h"
#include "base/string16.h"
+#include "webkit/plugins/webplugininfo.h"
namespace base {
class DictionaryValue;
@@ -34,6 +36,9 @@ class PluginFinder {
// Returns the plug-in with the given identifier.
PluginInstaller* FindPluginWithIdentifier(const std::string& identifier);
+ // Gets a plug-in installer using web plug-in info.
James Hawkins 2012/08/27 17:49:43 s/web plugin-in info/|plugin|/
ibraaaa 2012/08/28 15:01:45 Done.
+ PluginInstaller* GetPluginInstaller(const webkit::WebPluginInfo& plugin);
+
private:
friend struct DefaultSingletonTraits<PluginFinder>;
friend class Singleton<PluginFinder>;
@@ -54,6 +59,9 @@ class PluginFinder {
scoped_ptr<base::DictionaryValue> plugin_list_;
std::map<std::string, PluginInstaller*> installers_;
+ // Note: Don't free memory for its values since it holds pointers
James Hawkins 2012/08/27 17:49:43 nit: Blank line aboe this.
James Hawkins 2012/08/27 17:49:43 nit: Try to not use pronouns (it) because they (pr
ibraaaa 2012/08/28 15:01:45 Done.
ibraaaa 2012/08/28 15:01:45 Done.
+ // to same instances in |installers_| (Double De-allocation).
+ base::hash_map<string16, PluginInstaller*> name_installers_;
DISALLOW_COPY_AND_ASSIGN(PluginFinder);
};
« no previous file with comments | « no previous file | chrome/browser/plugin_finder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698