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

Unified Diff: content/browser/browser_main_loop.h

Issue 2464233002: Experiment with redirecting all BrowserThreads (but UI/IO) to TaskScheduler (Closed)
Patch Set: rm TODO Created 4 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 side-by-side diff with in-line comments
Download patch
Index: content/browser/browser_main_loop.h
diff --git a/content/browser/browser_main_loop.h b/content/browser/browser_main_loop.h
index 1464de7ced9cb6ae38c160ead17e1a935d9a6474..f32210ac27f033b6a7a8929b03b9ce27416dc2ad 100644
--- a/content/browser/browser_main_loop.h
+++ b/content/browser/browser_main_loop.h
@@ -26,10 +26,11 @@ namespace base {
class CommandLine;
class FilePath;
class HighResolutionTimerManager;
+class MemoryPressureMonitor;
class MessageLoop;
class PowerMonitor;
+class SingleThreadTaskRunner;
class SystemMonitor;
-class MemoryPressureMonitor;
namespace trace_event {
class TraceEventSystemStatsMonitor;
} // namespace trace_event
@@ -272,11 +273,20 @@ class CONTENT_EXPORT BrowserMainLoop {
#endif
// Members initialized in |CreateThreads()| ----------------------------------
+ // The |*_task_runner| members below are used in lieu of the |*_thread_| for
+ // thread IDs that are redirected to TaskScheduler (ref.
+ // ContentBrowserClient::RedirectNonUINonIOBrowserThreadsToTaskScheduler()).
std::unique_ptr<BrowserProcessSubThread> db_thread_;
std::unique_ptr<BrowserProcessSubThread> file_user_blocking_thread_;
std::unique_ptr<BrowserProcessSubThread> file_thread_;
std::unique_ptr<BrowserProcessSubThread> process_launcher_thread_;
std::unique_ptr<BrowserProcessSubThread> cache_thread_;
+ scoped_refptr<base::SingleThreadTaskRunner> db_task_runner_;
+ scoped_refptr<base::SingleThreadTaskRunner> file_user_blocking_task_runner_;
+ scoped_refptr<base::SingleThreadTaskRunner> file_task_runner_;
+ scoped_refptr<base::SingleThreadTaskRunner> process_launcher_task_runner_;
+ scoped_refptr<base::SingleThreadTaskRunner> cache_task_runner_;
+ // The IO thread is never redirected to TaskScheduler at this point.
std::unique_ptr<BrowserProcessSubThread> io_thread_;
// Members initialized in |BrowserThreadsStarted()| --------------------------

Powered by Google App Engine
This is Rietveld 408576698