OLD | NEW |
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_PLUGINS_PLUGIN_FINDER_H_ | 5 #ifndef CHROME_BROWSER_PLUGINS_PLUGIN_FINDER_H_ |
6 #define CHROME_BROWSER_PLUGINS_PLUGIN_FINDER_H_ | 6 #define CHROME_BROWSER_PLUGINS_PLUGIN_FINDER_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <memory> | 9 #include <memory> |
10 #include <string> | 10 #include <string> |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
73 FRIEND_TEST_ALL_PREFIXES(PluginFinderTest, PluginGroups); | 73 FRIEND_TEST_ALL_PREFIXES(PluginFinderTest, PluginGroups); |
74 | 74 |
75 PluginFinder(); | 75 PluginFinder(); |
76 ~PluginFinder(); | 76 ~PluginFinder(); |
77 | 77 |
78 // Loads the plugin information from the browser resources and parses it. | 78 // Loads the plugin information from the browser resources and parses it. |
79 // Returns NULL if the plugin list couldn't be parsed. | 79 // Returns NULL if the plugin list couldn't be parsed. |
80 static base::DictionaryValue* LoadBuiltInPluginList(); | 80 static base::DictionaryValue* LoadBuiltInPluginList(); |
81 | 81 |
82 #if BUILDFLAG(ENABLE_PLUGIN_INSTALLATION) | 82 #if BUILDFLAG(ENABLE_PLUGIN_INSTALLATION) |
83 std::map<std::string, PluginInstaller*> installers_; | 83 std::map<std::string, std::unique_ptr<PluginInstaller>> installers_; |
84 #endif | 84 #endif |
85 | 85 |
86 std::map<std::string, PluginMetadata*> identifier_plugin_; | 86 std::map<std::string, std::unique_ptr<PluginMetadata>> identifier_plugin_; |
87 | 87 |
88 // Version of the metadata information. We use this to consolidate multiple | 88 // Version of the metadata information. We use this to consolidate multiple |
89 // sources (baked into resource and fetched from a URL), making sure that we | 89 // sources (baked into resource and fetched from a URL), making sure that we |
90 // don't overwrite newer versions with older ones. | 90 // don't overwrite newer versions with older ones. |
91 int version_; | 91 int version_; |
92 | 92 |
93 // Synchronization for the above member variables is | 93 // Synchronization for the above member variables is |
94 // required since multiple threads can be accessing them concurrently. | 94 // required since multiple threads can be accessing them concurrently. |
95 base::Lock mutex_; | 95 base::Lock mutex_; |
96 | 96 |
97 DISALLOW_COPY_AND_ASSIGN(PluginFinder); | 97 DISALLOW_COPY_AND_ASSIGN(PluginFinder); |
98 }; | 98 }; |
99 | 99 |
100 #endif // CHROME_BROWSER_PLUGINS_PLUGIN_FINDER_H_ | 100 #endif // CHROME_BROWSER_PLUGINS_PLUGIN_FINDER_H_ |
OLD | NEW |