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

Unified Diff: storage/browser/fileapi/file_system_operation_runner.cc

Issue 1115663002: [storage/browser/fileapi] Replace MessageLoopProxy usage with ThreadTaskRunnerHandle (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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
Index: storage/browser/fileapi/file_system_operation_runner.cc
diff --git a/storage/browser/fileapi/file_system_operation_runner.cc b/storage/browser/fileapi/file_system_operation_runner.cc
index 848929f38cdb95a60989524a604a7429f7904d69..a53f5883210868da99c2df5bf411872d2d93d569 100644
--- a/storage/browser/fileapi/file_system_operation_runner.cc
+++ b/storage/browser/fileapi/file_system_operation_runner.cc
@@ -5,8 +5,8 @@
#include "storage/browser/fileapi/file_system_operation_runner.h"
#include "base/bind.h"
-#include "base/message_loop/message_loop_proxy.h"
#include "base/stl_util.h"
+#include "base/thread_task_runner_handle.h"
#include "net/url_request/url_request_context.h"
#include "storage/browser/blob/blob_url_request_job_factory.h"
#include "storage/browser/blob/shareable_file_reference.h"
@@ -514,7 +514,7 @@ void FileSystemOperationRunner::DidFinish(
base::File::Error rv) {
if (handle.scope) {
finished_operations_.insert(handle.id);
- base::MessageLoopProxy::current()->PostTask(
+ base::ThreadTaskRunnerHandle::Get()->PostTask(
FROM_HERE, base::Bind(&FileSystemOperationRunner::DidFinish,
AsWeakPtr(), handle, callback, rv));
return;
@@ -530,7 +530,7 @@ void FileSystemOperationRunner::DidGetMetadata(
const base::File::Info& file_info) {
if (handle.scope) {
finished_operations_.insert(handle.id);
- base::MessageLoopProxy::current()->PostTask(
+ base::ThreadTaskRunnerHandle::Get()->PostTask(
FROM_HERE, base::Bind(&FileSystemOperationRunner::DidGetMetadata,
AsWeakPtr(), handle, callback, rv, file_info));
return;
@@ -547,7 +547,7 @@ void FileSystemOperationRunner::DidReadDirectory(
bool has_more) {
if (handle.scope) {
finished_operations_.insert(handle.id);
- base::MessageLoopProxy::current()->PostTask(
+ base::ThreadTaskRunnerHandle::Get()->PostTask(
FROM_HERE, base::Bind(&FileSystemOperationRunner::DidReadDirectory,
AsWeakPtr(), handle, callback, rv,
entries, has_more));
@@ -566,7 +566,7 @@ void FileSystemOperationRunner::DidWrite(
bool complete) {
if (handle.scope) {
finished_operations_.insert(handle.id);
- base::MessageLoopProxy::current()->PostTask(
+ base::ThreadTaskRunnerHandle::Get()->PostTask(
FROM_HERE, base::Bind(&FileSystemOperationRunner::DidWrite, AsWeakPtr(),
handle, callback, rv, bytes, complete));
return;
@@ -583,7 +583,7 @@ void FileSystemOperationRunner::DidOpenFile(
const base::Closure& on_close_callback) {
if (handle.scope) {
finished_operations_.insert(handle.id);
- base::MessageLoopProxy::current()->PostTask(
+ base::ThreadTaskRunnerHandle::Get()->PostTask(
FROM_HERE, base::Bind(&FileSystemOperationRunner::DidOpenFile,
AsWeakPtr(), handle, callback, Passed(&file),
on_close_callback));
@@ -602,7 +602,7 @@ void FileSystemOperationRunner::DidCreateSnapshot(
const scoped_refptr<storage::ShareableFileReference>& file_ref) {
if (handle.scope) {
finished_operations_.insert(handle.id);
- base::MessageLoopProxy::current()->PostTask(
+ base::ThreadTaskRunnerHandle::Get()->PostTask(
FROM_HERE, base::Bind(&FileSystemOperationRunner::DidCreateSnapshot,
AsWeakPtr(), handle, callback, rv, file_info,
platform_path, file_ref));
@@ -620,7 +620,7 @@ void FileSystemOperationRunner::OnCopyProgress(
const FileSystemURL& dest_url,
int64 size) {
if (handle.scope) {
- base::MessageLoopProxy::current()->PostTask(
+ base::ThreadTaskRunnerHandle::Get()->PostTask(
FROM_HERE, base::Bind(
&FileSystemOperationRunner::OnCopyProgress,
AsWeakPtr(), handle, callback, type, source_url, dest_url, size));
« no previous file with comments | « storage/browser/fileapi/file_system_context.cc ('k') | storage/browser/fileapi/isolated_file_system_backend.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698