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

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

Issue 2733283002: Require explicit selection of traits for LazyInstance (Closed)
Patch Set: Created 3 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 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 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 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 virtual ~PluginList(); 125 virtual ~PluginList();
126 126
127 private: 127 private:
128 enum LoadingState { 128 enum LoadingState {
129 LOADING_STATE_NEEDS_REFRESH, 129 LOADING_STATE_NEEDS_REFRESH,
130 LOADING_STATE_REFRESHING, 130 LOADING_STATE_REFRESHING,
131 LOADING_STATE_UP_TO_DATE, 131 LOADING_STATE_UP_TO_DATE,
132 }; 132 };
133 133
134 friend class PluginListTest; 134 friend class PluginListTest;
135 friend struct base::DefaultLazyInstanceTraits<PluginList>; 135 friend struct base::LazyInstanceTraitsBase<PluginList>;
136 136
137 PluginList(); 137 PluginList();
138 138
139 // Load all plugins from the default plugins directory. 139 // Load all plugins from the default plugins directory.
140 void LoadPlugins(); 140 void LoadPlugins();
141 141
142 // Returns true if the given plugin supports a given file extension. 142 // Returns true if the given plugin supports a given file extension.
143 // |extension| should be all lower case. If |mime_type| is not NULL, it will 143 // |extension| should be all lower case. If |mime_type| is not NULL, it will
144 // be set to the MIME type if found. The MIME type which corresponds to the 144 // be set to the MIME type if found. The MIME type which corresponds to the
145 // extension is optionally returned back. 145 // extension is optionally returned back.
(...skipping 29 matching lines...) Expand all
175 // Need synchronization for the above members since this object can be 175 // Need synchronization for the above members since this object can be
176 // accessed on multiple threads. 176 // accessed on multiple threads.
177 base::Lock lock_; 177 base::Lock lock_;
178 178
179 DISALLOW_COPY_AND_ASSIGN(PluginList); 179 DISALLOW_COPY_AND_ASSIGN(PluginList);
180 }; 180 };
181 181
182 } // namespace content 182 } // namespace content
183 183
184 #endif // CONTENT_COMMON_PLUGIN_LIST_H_ 184 #endif // CONTENT_COMMON_PLUGIN_LIST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698