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

Unified Diff: content/browser/download/download_task_runner.cc

Issue 2890853002: Downloads: replace BrowserThread::FILE with task scheduler. (Closed)
Patch Set: Address Gab's comments. Created 3 years, 5 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 side-by-side diff with in-line comments
Download patch
Index: content/browser/download/download_task_runner.cc
diff --git a/content/browser/download/download_task_runner.cc b/content/browser/download/download_task_runner.cc
new file mode 100644
index 0000000000000000000000000000000000000000..903f208ccc71a5d84bf17f0798298c7f9bcff15a
--- /dev/null
+++ b/content/browser/download/download_task_runner.cc
@@ -0,0 +1,23 @@
+// Copyright 2017 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "content/browser/download/download_task_runner.h"
+
+#include "base/task_scheduler/lazy_task_runner.h"
+
+namespace content {
+
+namespace {
+
+base::LazySequencedTaskRunner g_download_task_runner =
+ LAZY_SEQUENCED_TASK_RUNNER_INITIALIZER(
+ base::TaskTraits(base::MayBlock(), base::TaskPriority::USER_VISIBLE));
+
+} // namespace
+
+scoped_refptr<base::SequencedTaskRunner> GetDownloadTaskRunner() {
+ return g_download_task_runner.Get();
+}
+
+} // namespace content

Powered by Google App Engine
This is Rietveld 408576698