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

Side by Side Diff: content/common/plugin_list.h

Issue 2059143002: "up-to-date" should only use hyphens when used as compound modifier of a noun (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 6 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
« no previous file with comments | « content/common/all_messages.h ('k') | content/common/plugin_list.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 CONTENT_COMMON_PLUGIN_LIST_H_ 5 #ifndef CONTENT_COMMON_PLUGIN_LIST_H_
6 #define CONTENT_COMMON_PLUGIN_LIST_H_ 6 #define CONTENT_COMMON_PLUGIN_LIST_H_
7 7
8 #include <set> 8 #include <set>
9 #include <string> 9 #include <string>
10 #include <utility> 10 #include <utility>
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 // Creates a WebPluginInfo structure given a plugin's path. On success 68 // Creates a WebPluginInfo structure given a plugin's path. On success
69 // returns true, with the information being put into "info". 69 // returns true, with the information being put into "info".
70 // Returns false if the library couldn't be found, or if it's not a plugin. 70 // Returns false if the library couldn't be found, or if it's not a plugin.
71 bool ReadPluginInfo(const base::FilePath& filename, 71 bool ReadPluginInfo(const base::FilePath& filename,
72 WebPluginInfo* info); 72 WebPluginInfo* info);
73 73
74 // Get all the plugins synchronously, loading them if necessary. 74 // Get all the plugins synchronously, loading them if necessary.
75 void GetPlugins(std::vector<WebPluginInfo>* plugins); 75 void GetPlugins(std::vector<WebPluginInfo>* plugins);
76 76
77 // Copies the list of plugins into |plugins| without loading them. 77 // Copies the list of plugins into |plugins| without loading them.
78 // Returns true if the list of plugins is up-to-date. 78 // Returns true if the list of plugins is up to date.
79 bool GetPluginsNoRefresh(std::vector<WebPluginInfo>* plugins); 79 bool GetPluginsNoRefresh(std::vector<WebPluginInfo>* plugins);
80 80
81 // Returns a list in |info| containing plugins that are found for 81 // Returns a list in |info| containing plugins that are found for
82 // the given url and mime type (including disabled plugins, for 82 // the given url and mime type (including disabled plugins, for
83 // which |info->enabled| is false). The mime type which corresponds 83 // which |info->enabled| is false). The mime type which corresponds
84 // to the URL is optionally returned back in |actual_mime_types| (if 84 // to the URL is optionally returned back in |actual_mime_types| (if
85 // it is non-NULL), one for each of the plugin info objects found. 85 // it is non-NULL), one for each of the plugin info objects found.
86 // The |allow_wildcard| parameter controls whether this function 86 // The |allow_wildcard| parameter controls whether this function
87 // returns plugins which support wildcard mime types (* as the mime 87 // returns plugins which support wildcard mime types (* as the mime
88 // type). The |info| parameter is required to be non-NULL. The 88 // type). The |info| parameter is required to be non-NULL. The
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
149 // Removes |plugin_path| from the list of extra plugin paths. Should only be 149 // Removes |plugin_path| from the list of extra plugin paths. Should only be
150 // called while holding |lock_|. 150 // called while holding |lock_|.
151 void RemoveExtraPluginPathLocked(const base::FilePath& plugin_path); 151 void RemoveExtraPluginPathLocked(const base::FilePath& plugin_path);
152 152
153 // 153 //
154 // Internals 154 // Internals
155 // 155 //
156 156
157 // States whether we will load the plugin list the next time we try to access 157 // States whether we will load the plugin list the next time we try to access
158 // it, whether we are currently in the process of loading it, or whether we 158 // it, whether we are currently in the process of loading it, or whether we
159 // consider it up-to-date. 159 // consider it up to date.
160 LoadingState loading_state_; 160 LoadingState loading_state_;
161 161
162 // Extra plugin paths that we want to search when loading. 162 // Extra plugin paths that we want to search when loading.
163 std::vector<base::FilePath> extra_plugin_paths_; 163 std::vector<base::FilePath> extra_plugin_paths_;
164 164
165 // Holds information about internal plugins. 165 // Holds information about internal plugins.
166 std::vector<WebPluginInfo> internal_plugins_; 166 std::vector<WebPluginInfo> internal_plugins_;
167 167
168 // A list holding all plugins. 168 // A list holding all plugins.
169 std::vector<WebPluginInfo> plugins_list_; 169 std::vector<WebPluginInfo> plugins_list_;
170 170
171 // Callback that is invoked whenever the PluginList will reload the plugins. 171 // Callback that is invoked whenever the PluginList will reload the plugins.
172 base::Closure will_load_plugins_callback_; 172 base::Closure will_load_plugins_callback_;
173 173
174 // Need synchronization for the above members since this object can be 174 // Need synchronization for the above members since this object can be
175 // accessed on multiple threads. 175 // accessed on multiple threads.
176 base::Lock lock_; 176 base::Lock lock_;
177 177
178 DISALLOW_COPY_AND_ASSIGN(PluginList); 178 DISALLOW_COPY_AND_ASSIGN(PluginList);
179 }; 179 };
180 180
181 } // namespace content 181 } // namespace content
182 182
183 #endif // CONTENT_COMMON_PLUGIN_LIST_H_ 183 #endif // CONTENT_COMMON_PLUGIN_LIST_H_
OLDNEW
« no previous file with comments | « content/common/all_messages.h ('k') | content/common/plugin_list.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698