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

Unified Diff: third_party/WebKit/Source/modules/filesystem/LocalFileSystem.cpp

Issue 2698153003: Reduce createSameThreadTask usage in modules/ (Closed)
Patch Set: Move a static callback to an anonymous namespace Created 3 years, 10 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 | third_party/WebKit/Source/modules/notifications/Notification.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/modules/filesystem/LocalFileSystem.cpp
diff --git a/third_party/WebKit/Source/modules/filesystem/LocalFileSystem.cpp b/third_party/WebKit/Source/modules/filesystem/LocalFileSystem.cpp
index 094898ea4b7f41b93682400142578ba2540849c6..a09747a928068aea32c7dfadf013ef6f0bddb430 100644
--- a/third_party/WebKit/Source/modules/filesystem/LocalFileSystem.cpp
+++ b/third_party/WebKit/Source/modules/filesystem/LocalFileSystem.cpp
@@ -32,7 +32,6 @@
#include "core/dom/Document.h"
#include "core/dom/ExecutionContext.h"
-#include "core/dom/ExecutionContextTask.h"
#include "core/dom/TaskRunnerHelper.h"
#include "core/fileapi/FileError.h"
#include "core/frame/LocalFrame.h"
@@ -136,17 +135,17 @@ void LocalFileSystem::requestFileSystemAccessInternal(
void LocalFileSystem::fileSystemNotAvailable(ExecutionContext* context,
CallbackWrapper* callbacks) {
- context->postTask(
- TaskType::FileReading, BLINK_FROM_HERE,
- createSameThreadTask(&reportFailure, WTF::passed(callbacks->release()),
+ TaskRunnerHelper::get(TaskType::FileReading, context)
+ ->postTask(BLINK_FROM_HERE,
+ WTF::bind(&reportFailure, WTF::passed(callbacks->release()),
FileError::kAbortErr));
}
void LocalFileSystem::fileSystemNotAllowedInternal(ExecutionContext* context,
CallbackWrapper* callbacks) {
- context->postTask(
- TaskType::FileReading, BLINK_FROM_HERE,
- createSameThreadTask(&reportFailure, WTF::passed(callbacks->release()),
+ TaskRunnerHelper::get(TaskType::FileReading, context)
+ ->postTask(BLINK_FROM_HERE,
+ WTF::bind(&reportFailure, WTF::passed(callbacks->release()),
FileError::kAbortErr));
}
« no previous file with comments | « no previous file | third_party/WebKit/Source/modules/notifications/Notification.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698