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

Unified Diff: net/disk_cache/cache_util.cc

Issue 2610503002: Use TaskScheduler instead of WorkerPool in cache_util.cc. (Closed)
Patch Set: add ScopedTaskScheduler Created 3 years, 11 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 | « net/disk_cache/backend_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/disk_cache/cache_util.cc
diff --git a/net/disk_cache/cache_util.cc b/net/disk_cache/cache_util.cc
index 51ec95b492c4198d9d822c0fdb4790ebe0f780be..19e71b8fb39ce7d9dd385d6a229f69b1d9d2a202 100644
--- a/net/disk_cache/cache_util.cc
+++ b/net/disk_cache/cache_util.cc
@@ -12,8 +12,8 @@
#include "base/strings/string_util.h"
#include "base/strings/stringprintf.h"
#include "base/strings/utf_string_conversions.h"
+#include "base/task_scheduler/post_task.h"
#include "base/threading/thread_restrictions.h"
-#include "base/threading/worker_pool.h"
namespace {
@@ -136,8 +136,13 @@ bool DelayedCacheCleanup(const base::FilePath& full_path) {
return false;
}
- base::WorkerPool::PostTask(
- FROM_HERE, base::Bind(&CleanupCallback, path, name_str), true);
+ base::PostTaskWithTraits(
+ FROM_HERE, base::TaskTraits()
+ .WithShutdownBehavior(
+ base::TaskShutdownBehavior::CONTINUE_ON_SHUTDOWN)
+ .WithPriority(base::TaskPriority::BACKGROUND)
+ .MayBlock(),
+ base::Bind(&CleanupCallback, path, name_str));
return true;
}
« no previous file with comments | « net/disk_cache/backend_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698