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

Side by Side Diff: chrome/browser/plugin_finder.h

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: 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_PLUGIN_FINDER_H_ 5 #ifndef CHROME_BROWSER_PLUGIN_FINDER_H_
6 #define CHROME_BROWSER_PLUGIN_FINDER_H_ 6 #define CHROME_BROWSER_PLUGIN_FINDER_H_
7 7
8 #include <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 10
(...skipping 16 matching lines...) Expand all
27 27
28 // Finds a plug-in for the given MIME type and language (specified as an IETF 28 // Finds a plug-in for the given MIME type and language (specified as an IETF
29 // language tag, i.e. en-US) and returns the PluginInstaller for the plug-in, 29 // language tag, i.e. en-US) and returns the PluginInstaller for the plug-in,
30 // or NULL if no plug-in is found. 30 // or NULL if no plug-in is found.
31 PluginInstaller* FindPlugin(const std::string& mime_type, 31 PluginInstaller* FindPlugin(const std::string& mime_type,
32 const std::string& language); 32 const std::string& language);
33 33
34 // Returns the plug-in with the given identifier. 34 // Returns the plug-in with the given identifier.
35 PluginInstaller* FindPluginWithIdentifier(const std::string& identifier); 35 PluginInstaller* FindPluginWithIdentifier(const std::string& identifier);
36 36
37 // Returns a map of all data loaded from:
Bernhard Bauer 2012/08/21 12:30:18 Nit: one space too many.
ibraaaa 2012/08/21 14:26:04 Done.
38 // 'chrome/browser/resources/plugin_metadata/plugins_*.json' files.
Bernhard Bauer 2012/08/21 12:30:18 I think we can just refer to the plugin metadata f
ibraaaa 2012/08/21 14:26:04 Done.
39 // The key is the plug-in identifier.
40 // The value is an instance of PluginInstaller holding the loaded data.
41 const std::map<std::string, PluginInstaller*>& GetAllPluginInstallers();
42
37 private: 43 private:
38 friend struct DefaultSingletonTraits<PluginFinder>; 44 friend struct DefaultSingletonTraits<PluginFinder>;
39 friend class Singleton<PluginFinder>; 45 friend class Singleton<PluginFinder>;
46 friend class PluginInstaller;
Bernhard Bauer 2012/08/21 12:30:18 Nit: Move before Singleton to keep this alphabetiz
ibraaaa 2012/08/21 14:26:04 Done.
40 FRIEND_TEST_ALL_PREFIXES(PluginFinderTest, JsonSyntax); 47 FRIEND_TEST_ALL_PREFIXES(PluginFinderTest, JsonSyntax);
41 FRIEND_TEST_ALL_PREFIXES(PluginFinderTest, PluginGroups); 48 FRIEND_TEST_ALL_PREFIXES(PluginFinderTest, PluginGroups);
42 49
43 static PluginFinder* GetInstance(); 50 static PluginFinder* GetInstance();
44 51
45 PluginFinder(); 52 PluginFinder();
46 ~PluginFinder(); 53 ~PluginFinder();
47 54
48 // Loads the plug-in information from the browser resources and parses it. 55 // Loads the plug-in information from the browser resources and parses it.
49 // Returns NULL if the plug-in list couldn't be parsed. 56 // Returns NULL if the plug-in list couldn't be parsed.
50 static base::DictionaryValue* LoadPluginList(); 57 static base::DictionaryValue* LoadPluginList();
51 58
52 PluginInstaller* CreateInstaller(const std::string& identifier, 59 PluginInstaller* CreateInstaller(const std::string& identifier,
53 const base::DictionaryValue* plugin_dict); 60 const base::DictionaryValue* plugin_dict);
54 61
55 scoped_ptr<base::DictionaryValue> plugin_list_; 62 scoped_ptr<base::DictionaryValue> plugin_list_;
56 std::map<std::string, PluginInstaller*> installers_; 63 std::map<std::string, PluginInstaller*> installers_;
57 64
58 DISALLOW_COPY_AND_ASSIGN(PluginFinder); 65 DISALLOW_COPY_AND_ASSIGN(PluginFinder);
59 }; 66 };
60 67
61 #endif // CHROME_BROWSER_PLUGIN_FINDER_H_ 68 #endif // CHROME_BROWSER_PLUGIN_FINDER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698