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

Unified Diff: android_webview/browser/net/aw_url_request_context_getter.cc

Issue 2841693002: Use TaskScheduler instead of blocking pool in aw_url_request_context_getter.cc. (Closed)
Patch Set: Created 3 years, 8 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: android_webview/browser/net/aw_url_request_context_getter.cc
diff --git a/android_webview/browser/net/aw_url_request_context_getter.cc b/android_webview/browser/net/aw_url_request_context_getter.cc
index a3174299e02bf6cd5e2ce1da1445cf4d05d8e946..98bd9e99d74c470c1bb0a73925e5ba9885fe5d2c 100644
--- a/android_webview/browser/net/aw_url_request_context_getter.cc
+++ b/android_webview/browser/net/aw_url_request_context_getter.cc
@@ -22,6 +22,7 @@
#include "base/files/file_path.h"
#include "base/memory/ptr_util.h"
#include "base/strings/string_number_conversions.h"
+#include "base/task_scheduler/post_task.h"
#include "base/threading/sequenced_worker_pool.h"
#include "components/prefs/pref_service.h"
#include "content/public/browser/browser_thread.h"
@@ -111,9 +112,12 @@ std::unique_ptr<net::URLRequestJobFactory> CreateJobFactory(
bool set_protocol = aw_job_factory->SetProtocolHandler(
url::kFileScheme,
base::MakeUnique<net::FileProtocolHandler>(
- content::BrowserThread::GetBlockingPool()
- ->GetTaskRunnerWithShutdownBehavior(
- base::SequencedWorkerPool::SKIP_ON_SHUTDOWN)));
+ base::CreateTaskRunnerWithTraits(
+ base::TaskTraits()
+ .MayBlock()
+ .WithPriority(base::TaskPriority::BACKGROUND)
+ .WithShutdownBehavior(
+ base::TaskShutdownBehavior::SKIP_ON_SHUTDOWN))));
DCHECK(set_protocol);
set_protocol = aw_job_factory->SetProtocolHandler(
url::kDataScheme, base::MakeUnique<net::DataProtocolHandler>());
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698