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

Unified Diff: storage/browser/fileapi/recursive_operation_delegate.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
« no previous file with comments | « storage/browser/fileapi/plugin_private_file_system_backend.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: storage/browser/fileapi/recursive_operation_delegate.cc
diff --git a/storage/browser/fileapi/recursive_operation_delegate.cc b/storage/browser/fileapi/recursive_operation_delegate.cc
index e9d1466eca806a18851807ac9fcb0e97477fc229..609df31f8f03610c82137b26cc54e95ab73ccf79 100644
--- a/storage/browser/fileapi/recursive_operation_delegate.cc
+++ b/storage/browser/fileapi/recursive_operation_delegate.cc
@@ -5,6 +5,8 @@
#include "storage/browser/fileapi/recursive_operation_delegate.h"
#include "base/bind.h"
+#include "base/single_thread_task_runner.h"
+#include "base/thread_task_runner_handle.h"
#include "storage/browser/fileapi/file_system_context.h"
#include "storage/browser/fileapi/file_system_operation_runner.h"
@@ -150,12 +152,12 @@ void RecursiveOperationDelegate::ProcessPendingFiles() {
return;
// Run ProcessFile in parallel (upto kMaxInflightOperations).
- scoped_refptr<base::MessageLoopProxy> current_message_loop =
- base::MessageLoopProxy::current();
+ scoped_refptr<base::SingleThreadTaskRunner> current_task_runner =
+ base::ThreadTaskRunnerHandle::Get();
while (!pending_files_.empty() &&
inflight_operations_ < kMaxInflightOperations) {
++inflight_operations_;
- current_message_loop->PostTask(
+ current_task_runner->PostTask(
FROM_HERE,
base::Bind(&RecursiveOperationDelegate::ProcessFile,
AsWeakPtr(), pending_files_.front(),
« no previous file with comments | « storage/browser/fileapi/plugin_private_file_system_backend.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698