Index: net/disk_cache/blockfile/file_ios.cc |
diff --git a/net/disk_cache/blockfile/file_ios.cc b/net/disk_cache/blockfile/file_ios.cc |
index 5c9a6fadab62de89e577b315827a7ee7c5253dff..47ff7f8edf9b142dbb9c1ee7502201dc565e6ad4 100644 |
--- a/net/disk_cache/blockfile/file_ios.cc |
+++ b/net/disk_cache/blockfile/file_ios.cc |
@@ -14,7 +14,7 @@ |
#include "base/location.h" |
#include "base/logging.h" |
#include "base/macros.h" |
-#include "base/threading/worker_pool.h" |
+#include "base/task_scheduler/post_task.h" |
#include "net/base/net_errors.h" |
#include "net/disk_cache/blockfile/in_flight_io.h" |
#include "net/disk_cache/disk_cache.h" |
@@ -121,8 +121,12 @@ void FileInFlightIO::PostRead(disk_cache::File *file, void* buf, size_t buf_len, |
new FileBackgroundIO(file, buf, buf_len, offset, callback, this)); |
file->AddRef(); // Balanced on OnOperationComplete() |
- base::WorkerPool::PostTask(FROM_HERE, |
- base::Bind(&FileBackgroundIO::Read, operation.get()), true); |
+ base::PostTaskWithTraits( |
+ FROM_HERE, base::TaskTraits() |
+ .WithShutdownBehavior( |
+ base::TaskShutdownBehavior::CONTINUE_ON_SHUTDOWN) |
+ .MayBlock(), |
+ base::Bind(&FileBackgroundIO::Read, operation.get())); |
OnOperationPosted(operation.get()); |
} |
@@ -133,8 +137,12 @@ void FileInFlightIO::PostWrite(disk_cache::File* file, const void* buf, |
new FileBackgroundIO(file, buf, buf_len, offset, callback, this)); |
file->AddRef(); // Balanced on OnOperationComplete() |
- base::WorkerPool::PostTask(FROM_HERE, |
- base::Bind(&FileBackgroundIO::Write, operation.get()), true); |
+ base::PostTaskWithTraits( |
+ FROM_HERE, base::TaskTraits() |
+ .WithShutdownBehavior( |
+ base::TaskShutdownBehavior::CONTINUE_ON_SHUTDOWN) |
+ .MayBlock(), |
+ base::Bind(&FileBackgroundIO::Write, operation.get())); |
OnOperationPosted(operation.get()); |
} |