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

Unified Diff: chrome/browser/plugin_finder.h

Issue 9536013: Move |requires_authorization| flag for plug-ins out of webkit/ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: copyright Created 8 years, 9 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 | « chrome/browser/extensions/extension_content_settings_apitest.cc ('k') | 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 2b1bd491ef747340c998d326da8a77579d048a94..1667411e84156dc0dc699455e805ad6c7be76100 100644
--- a/chrome/browser/plugin_finder.h
+++ b/chrome/browser/plugin_finder.h
@@ -16,7 +16,6 @@
namespace base {
class DictionaryValue;
-class ListValue;
}
class GURL;
@@ -24,39 +23,36 @@ class PluginInstaller;
class PluginFinder {
public:
- typedef base::Callback<void(PluginInstaller*)> FindPluginCallback;
-
- static PluginFinder* GetInstance();
+ static void Get(const base::Callback<void(PluginFinder*)>& cb);
// Loads the plug-in information from the browser resources and parses it.
// Returns NULL if the plug-in list couldn't be parsed.
- static scoped_ptr<base::ListValue> LoadPluginList();
+ static scoped_ptr<base::DictionaryValue> LoadPluginList();
// Finds a plug-in for the given MIME type and language (specified as an IETF
- // language tag, i.e. en-US) and calls the callback with the PluginInstaller
- // for the plug-in, or NULL if no plug-in is found.
- void FindPlugin(const std::string& mime_type,
- const std::string& language,
- const FindPluginCallback& callback);
+ // language tag, i.e. en-US) and returns the PluginInstaller for the plug-in,
+ // or NULL if no plug-in is found.
+ PluginInstaller* FindPlugin(const std::string& mime_type,
+ const std::string& language);
- // Finds the plug-in with the given identifier and calls the callback.
- void FindPluginWithIdentifier(const std::string& identifier,
- const FindPluginCallback& callback);
+ // Returns the plug-in with the given identifier.
+ PluginInstaller* FindPluginWithIdentifier(const std::string& identifier);
private:
friend struct DefaultSingletonTraits<PluginFinder>;
+ friend class Singleton<PluginFinder>;
+
+ static PluginFinder* GetInstance();
PluginFinder();
~PluginFinder();
- static base::ListValue* LoadPluginListInternal();
+ static base::DictionaryValue* LoadPluginListInternal();
PluginInstaller* CreateInstaller(const std::string& identifier,
const base::DictionaryValue* plugin_dict);
- PluginInstaller* FindPluginInternal(const std::string& mime_type,
- const std::string& language);
- scoped_ptr<base::ListValue> plugin_list_;
+ scoped_ptr<base::DictionaryValue> plugin_list_;
std::map<std::string, PluginInstaller*> installers_;
DISALLOW_COPY_AND_ASSIGN(PluginFinder);
« no previous file with comments | « chrome/browser/extensions/extension_content_settings_apitest.cc ('k') | chrome/browser/plugin_finder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698