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

Unified Diff: content/browser/webui/url_data_manager_backend.cc

Issue 2611443002: Use TaskScheduler instead of WorkerPool in url_data_manager_backend.cc. (Closed)
Patch Set: fix build error Created 3 years, 12 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: content/browser/webui/url_data_manager_backend.cc
diff --git a/content/browser/webui/url_data_manager_backend.cc b/content/browser/webui/url_data_manager_backend.cc
index 246a443c2b2442950e8eea3ba5f1dc1d9c73b9ca..47deeb80bb3a59a0522b1ca0a9d84b2af5c86906 100644
--- a/content/browser/webui/url_data_manager_backend.cc
+++ b/content/browser/webui/url_data_manager_backend.cc
@@ -23,8 +23,8 @@
#include "base/strings/string_number_conversions.h"
#include "base/strings/string_util.h"
#include "base/strings/stringprintf.h"
+#include "base/task_scheduler/post_task.h"
#include "base/threading/thread_task_runner_handle.h"
-#include "base/threading/worker_pool.h"
#include "base/trace_event/trace_event.h"
#include "content/browser/blob_storage/chrome_blob_storage_context.h"
#include "content/browser/histogram_internals_request_job.h"
@@ -478,9 +478,11 @@ int URLRequestChromeJob::PostReadTask(scoped_refptr<net::IOBuffer> buf,
if (buf_size == 0)
return 0;
- base::WorkerPool::GetTaskRunner(false)->PostTaskAndReply(
- FROM_HERE, base::Bind(&CopyData, base::RetainedRef(buf), buf_size, data_,
- data_offset_),
+ base::PostTaskWithTraitsAndReply(
+ FROM_HERE, base::TaskTraits().WithShutdownBehavior(
+ base::TaskShutdownBehavior::CONTINUE_ON_SHUTDOWN),
Dan Beam 2017/01/02 19:55:22 i don't know how easy it is to do, but it'd be nic
fdoray 2017/01/02 19:58:28 We have plan to add a context trait. There will be
+ base::Bind(&CopyData, base::RetainedRef(buf), buf_size, data_,
+ data_offset_),
base::Bind(&URLRequestChromeJob::ReadRawDataComplete, AsWeakPtr(),
buf_size));
data_offset_ += buf_size;
« 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