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

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

Issue 26541011: Return matching plug-ins in the sorted order (by version number). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Use multiset Created 7 years, 1 month 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 | « no previous file | 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 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 WebPluginInfo* info); 164 WebPluginInfo* info);
165 #endif 165 #endif
166 166
167 private: 167 private:
168 enum LoadingState { 168 enum LoadingState {
169 LOADING_STATE_NEEDS_REFRESH, 169 LOADING_STATE_NEEDS_REFRESH,
170 LOADING_STATE_REFRESHING, 170 LOADING_STATE_REFRESHING,
171 LOADING_STATE_UP_TO_DATE, 171 LOADING_STATE_UP_TO_DATE,
172 }; 172 };
173 173
174 struct VersionComparator {
175 bool operator()(const WebPluginInfo& lhs, const WebPluginInfo& rhs) const;
176 };
177
174 friend class PluginListTest; 178 friend class PluginListTest;
175 friend struct base::DefaultLazyInstanceTraits<PluginList>; 179 friend struct base::DefaultLazyInstanceTraits<PluginList>;
176 180
177 PluginList(); 181 PluginList();
178 182
179 // Load all plugins from the default plugins directory. 183 // Load all plugins from the default plugins directory.
180 void LoadPlugins(bool include_npapi); 184 void LoadPlugins(bool include_npapi);
181 185
182 // Walks a directory and produces a list of all the plugins to potentially 186 // Walks a directory and produces a list of all the plugins to potentially
183 // load in that directory. 187 // load in that directory.
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
243 // Flag indicating whether third_party plugins will be searched for 247 // Flag indicating whether third_party plugins will be searched for
244 // in common places. 248 // in common places.
245 bool plugins_discovery_disabled_; 249 bool plugins_discovery_disabled_;
246 250
247 DISALLOW_COPY_AND_ASSIGN(PluginList); 251 DISALLOW_COPY_AND_ASSIGN(PluginList);
248 }; 252 };
249 253
250 } // namespace content 254 } // namespace content
251 255
252 #endif // CONTENT_COMMON_PLUGIN_LIST_H_ 256 #endif // CONTENT_COMMON_PLUGIN_LIST_H_
OLDNEW
« no previous file with comments | « no previous file | content/common/plugin_list.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698