Chromium Code Reviews| Index: chrome/browser/plugin_finder.h |
| diff --git a/chrome/browser/plugin_finder.h b/chrome/browser/plugin_finder.h |
| index f0d75d5c10acbe6612852b7b1fd304e0e8923496..4c3d97d83ff0ee638454c98ec5ff6c42c04c03af 100644 |
| --- a/chrome/browser/plugin_finder.h |
| +++ b/chrome/browser/plugin_finder.h |
| @@ -10,9 +10,12 @@ |
| #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/memory/weak_ptr.h" |
|
Bernhard Bauer
2012/08/23 09:05:07
Nit: Unnecessary #include.
ibraaaa
2012/08/23 09:58:33
Done.
|
| #include "base/string16.h" |
| +#include "webkit/plugins/webplugininfo.h" |
| namespace base { |
| class DictionaryValue; |
| @@ -34,6 +37,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. |
| + PluginInstaller* GetPluginInstaller(const webkit::WebPluginInfo& plugin); |
| + |
| private: |
| friend struct DefaultSingletonTraits<PluginFinder>; |
| friend class Singleton<PluginFinder>; |
| @@ -54,6 +60,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 |
| + // to same instances in |installers_| (Double De-allocation). |
| + base::hash_map<string16, PluginInstaller*> name_installers_; |
| DISALLOW_COPY_AND_ASSIGN(PluginFinder); |
| }; |