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

Side by Side Diff: content/browser/plugin_service_impl.h

Issue 632833002: Remove raw handles from base::win::RegKey (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove XP specific code. Created 6 years, 2 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 | « base/win/registry_unittest.cc ('k') | content/browser/plugin_service_impl.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 // This class responds to requests from renderers for the list of plugins, and 5 // This class responds to requests from renderers for the list of plugins, and
6 // also a proxy object for plugin instances. 6 // also a proxy object for plugin instances.
7 7
8 #ifndef CONTENT_BROWSER_PLUGIN_SERVICE_IMPL_H_ 8 #ifndef CONTENT_BROWSER_PLUGIN_SERVICE_IMPL_H_
9 #define CONTENT_BROWSER_PLUGIN_SERVICE_IMPL_H_ 9 #define CONTENT_BROWSER_PLUGIN_SERVICE_IMPL_H_
10 10
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
159 void RegisterPluginCrash(const base::FilePath& plugin_path); 159 void RegisterPluginCrash(const base::FilePath& plugin_path);
160 160
161 private: 161 private:
162 friend struct DefaultSingletonTraits<PluginServiceImpl>; 162 friend struct DefaultSingletonTraits<PluginServiceImpl>;
163 163
164 // Creates the PluginServiceImpl object, but doesn't actually build the plugin 164 // Creates the PluginServiceImpl object, but doesn't actually build the plugin
165 // list yet. It's generated lazily. 165 // list yet. It's generated lazily.
166 PluginServiceImpl(); 166 PluginServiceImpl();
167 virtual ~PluginServiceImpl(); 167 virtual ~PluginServiceImpl();
168 168
169 void OnWaitableEventSignaled(base::WaitableEvent* waitable_event); 169 #if defined(OS_WIN)
170 void OnKeyChanged(base::win::RegKey* key);
171 #endif
170 172
171 // Returns the plugin process host corresponding to the plugin process that 173 // Returns the plugin process host corresponding to the plugin process that
172 // has been started by this service. Returns NULL if no process has been 174 // has been started by this service. Returns NULL if no process has been
173 // started. 175 // started.
174 PluginProcessHost* FindNpapiPluginProcess(const base::FilePath& plugin_path); 176 PluginProcessHost* FindNpapiPluginProcess(const base::FilePath& plugin_path);
175 PpapiPluginProcessHost* FindPpapiPluginProcess( 177 PpapiPluginProcessHost* FindPpapiPluginProcess(
176 const base::FilePath& plugin_path, 178 const base::FilePath& plugin_path,
177 const base::FilePath& profile_data_directory); 179 const base::FilePath& profile_data_directory);
178 PpapiPluginProcessHost* FindPpapiBrokerProcess( 180 PpapiPluginProcessHost* FindPpapiBrokerProcess(
179 const base::FilePath& broker_path); 181 const base::FilePath& broker_path);
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
217 #if defined(OS_POSIX) && !defined(OS_OPENBSD) && !defined(OS_ANDROID) 219 #if defined(OS_POSIX) && !defined(OS_OPENBSD) && !defined(OS_ANDROID)
218 // Registers a new FilePathWatcher for a given path. 220 // Registers a new FilePathWatcher for a given path.
219 static void RegisterFilePathWatcher(base::FilePathWatcher* watcher, 221 static void RegisterFilePathWatcher(base::FilePathWatcher* watcher,
220 const base::FilePath& path); 222 const base::FilePath& path);
221 #endif 223 #endif
222 224
223 #if defined(OS_WIN) 225 #if defined(OS_WIN)
224 // Registry keys for getting notifications when new plugins are installed. 226 // Registry keys for getting notifications when new plugins are installed.
225 base::win::RegKey hkcu_key_; 227 base::win::RegKey hkcu_key_;
226 base::win::RegKey hklm_key_; 228 base::win::RegKey hklm_key_;
227 scoped_ptr<base::WaitableEvent> hkcu_event_;
228 scoped_ptr<base::WaitableEvent> hklm_event_;
229 base::WaitableEventWatcher hkcu_watcher_;
230 base::WaitableEventWatcher hklm_watcher_;
231 #endif 229 #endif
232 230
233 #if defined(OS_POSIX) && !defined(OS_OPENBSD) && !defined(OS_ANDROID) 231 #if defined(OS_POSIX) && !defined(OS_OPENBSD) && !defined(OS_ANDROID)
234 ScopedVector<base::FilePathWatcher> file_watchers_; 232 ScopedVector<base::FilePathWatcher> file_watchers_;
235 #endif 233 #endif
236 234
237 std::vector<PepperPluginInfo> ppapi_plugins_; 235 std::vector<PepperPluginInfo> ppapi_plugins_;
238 236
239 // Weak pointer; outlives us. 237 // Weak pointer; outlives us.
240 PluginServiceFilter* filter_; 238 PluginServiceFilter* filter_;
241 239
242 std::set<PluginProcessHost::Client*> pending_plugin_clients_; 240 std::set<PluginProcessHost::Client*> pending_plugin_clients_;
243 241
244 // Used to sequentialize loading plug-ins from disk. 242 // Used to sequentialize loading plug-ins from disk.
245 base::SequencedWorkerPool::SequenceToken plugin_list_token_; 243 base::SequencedWorkerPool::SequenceToken plugin_list_token_;
246 244
247 #if defined(OS_POSIX) 245 #if defined(OS_POSIX)
248 scoped_refptr<PluginLoaderPosix> plugin_loader_; 246 scoped_refptr<PluginLoaderPosix> plugin_loader_;
249 #endif 247 #endif
250 248
251 // Used to detect if a given plug-in is crashing over and over. 249 // Used to detect if a given plug-in is crashing over and over.
252 std::map<base::FilePath, std::vector<base::Time> > crash_times_; 250 std::map<base::FilePath, std::vector<base::Time> > crash_times_;
253 251
254 DISALLOW_COPY_AND_ASSIGN(PluginServiceImpl); 252 DISALLOW_COPY_AND_ASSIGN(PluginServiceImpl);
255 }; 253 };
256 254
257 } // namespace content 255 } // namespace content
258 256
259 #endif // CONTENT_BROWSER_PLUGIN_SERVICE_IMPL_H_ 257 #endif // CONTENT_BROWSER_PLUGIN_SERVICE_IMPL_H_
OLDNEW
« no previous file with comments | « base/win/registry_unittest.cc ('k') | content/browser/plugin_service_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698