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

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

Issue 2319623002: Remove calls to IsRunningSequenceOnCurrentThread() from plugin_service_impl.cc (Closed)
Patch Set: fix android build error Created 4 years, 3 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 // 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
11 #if !defined(ENABLE_PLUGINS) 11 #if !defined(ENABLE_PLUGINS)
12 #error "Plugins should be enabled" 12 #error "Plugins should be enabled"
13 #endif 13 #endif
14 14
15 #include <map> 15 #include <map>
16 #include <memory> 16 #include <memory>
17 #include <set> 17 #include <set>
18 #include <vector> 18 #include <vector>
19 19
20 #include "base/compiler_specific.h" 20 #include "base/compiler_specific.h"
21 #include "base/macros.h" 21 #include "base/macros.h"
22 #include "base/memory/ref_counted.h"
22 #include "base/memory/scoped_vector.h" 23 #include "base/memory/scoped_vector.h"
23 #include "base/memory/singleton.h" 24 #include "base/memory/singleton.h"
25 #include "base/sequence_checker.h"
26 #include "base/sequenced_task_runner.h"
24 #include "base/synchronization/waitable_event_watcher.h" 27 #include "base/synchronization/waitable_event_watcher.h"
25 #include "base/threading/sequenced_worker_pool.h"
26 #include "base/time/time.h" 28 #include "base/time/time.h"
27 #include "build/build_config.h" 29 #include "build/build_config.h"
28 #include "content/browser/ppapi_plugin_process_host.h" 30 #include "content/browser/ppapi_plugin_process_host.h"
29 #include "content/common/content_export.h" 31 #include "content/common/content_export.h"
30 #include "content/public/browser/plugin_service.h" 32 #include "content/public/browser/plugin_service.h"
31 #include "content/public/common/pepper_plugin_info.h" 33 #include "content/public/common/pepper_plugin_info.h"
32 #include "ipc/ipc_channel_handle.h" 34 #include "ipc/ipc_channel_handle.h"
33 #include "url/gurl.h" 35 #include "url/gurl.h"
34 36
35 #if defined(OS_WIN) 37 #if defined(OS_WIN)
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 144
143 // Run on the blocking pool to load the plugins synchronously. 145 // Run on the blocking pool to load the plugins synchronously.
144 void GetPluginsInternal(base::SingleThreadTaskRunner* target_task_runner, 146 void GetPluginsInternal(base::SingleThreadTaskRunner* target_task_runner,
145 const GetPluginsCallback& callback); 147 const GetPluginsCallback& callback);
146 148
147 std::vector<PepperPluginInfo> ppapi_plugins_; 149 std::vector<PepperPluginInfo> ppapi_plugins_;
148 150
149 // Weak pointer; outlives us. 151 // Weak pointer; outlives us.
150 PluginServiceFilter* filter_; 152 PluginServiceFilter* filter_;
151 153
152 // Used to sequentialize loading plugins from disk. 154 // Used to load plugins from disk.
153 base::SequencedWorkerPool::SequenceToken plugin_list_token_; 155 scoped_refptr<base::SequencedTaskRunner> plugin_list_task_runner_;
156
157 // Used to verify that loading plugins from disk is done sequentially.
158 base::SequenceChecker plugin_list_sequence_checker_;
154 159
155 // Used to detect if a given plugin is crashing over and over. 160 // Used to detect if a given plugin is crashing over and over.
156 std::map<base::FilePath, std::vector<base::Time> > crash_times_; 161 std::map<base::FilePath, std::vector<base::Time> > crash_times_;
157 162
158 DISALLOW_COPY_AND_ASSIGN(PluginServiceImpl); 163 DISALLOW_COPY_AND_ASSIGN(PluginServiceImpl);
159 }; 164 };
160 165
161 } // namespace content 166 } // namespace content
162 167
163 #endif // CONTENT_BROWSER_PLUGIN_SERVICE_IMPL_H_ 168 #endif // CONTENT_BROWSER_PLUGIN_SERVICE_IMPL_H_
OLDNEW
« no previous file with comments | « chrome/browser/download/chrome_download_manager_delegate_unittest.cc ('k') | content/browser/plugin_service_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698