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

Unified Diff: third_party/WebKit/Source/modules/quota/DeprecatedStorageQuota.cpp

Issue 2700753002: Replace ExecutionContextTask with WTF::Closure in StorageErrorCallback (Closed)
Patch Set: 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
Index: third_party/WebKit/Source/modules/quota/DeprecatedStorageQuota.cpp
diff --git a/third_party/WebKit/Source/modules/quota/DeprecatedStorageQuota.cpp b/third_party/WebKit/Source/modules/quota/DeprecatedStorageQuota.cpp
index 98d4669772c6ac273c0258bee9d4b371e2003423..f24868aba465289e3d478b9f9de0dc8f04264206 100644
--- a/third_party/WebKit/Source/modules/quota/DeprecatedStorageQuota.cpp
+++ b/third_party/WebKit/Source/modules/quota/DeprecatedStorageQuota.cpp
@@ -39,6 +39,7 @@
#include "modules/quota/StorageQuotaClient.h"
#include "modules/quota/StorageUsageCallback.h"
#include "platform/StorageQuotaCallbacks.h"
+#include "platform/WebTaskRunner.h"
#include "platform/weborigin/KURL.h"
#include "platform/weborigin/SecurityOrigin.h"
#include "public/platform/Platform.h"
@@ -61,17 +62,17 @@ void DeprecatedStorageQuota::queryUsageAndQuota(
if (storageType != WebStorageQuotaTypeTemporary &&
storageType != WebStorageQuotaTypePersistent) {
// Unknown storage type is requested.
- executionContext->postTask(TaskType::MiscPlatformAPI, BLINK_FROM_HERE,
- StorageErrorCallback::createSameThreadTask(
- errorCallback, NotSupportedError));
+ TaskRunnerHelper::get(TaskType::MiscPlatformAPI, executionContext)
+ ->postTask(BLINK_FROM_HERE, StorageErrorCallback::createSameThreadTask(
+ errorCallback, NotSupportedError));
return;
}
SecurityOrigin* securityOrigin = executionContext->getSecurityOrigin();
if (securityOrigin->isUnique()) {
- executionContext->postTask(TaskType::MiscPlatformAPI, BLINK_FROM_HERE,
- StorageErrorCallback::createSameThreadTask(
- errorCallback, NotSupportedError));
+ TaskRunnerHelper::get(TaskType::MiscPlatformAPI, executionContext)
+ ->postTask(BLINK_FROM_HERE, StorageErrorCallback::createSameThreadTask(
+ errorCallback, NotSupportedError));
return;
}
@@ -94,17 +95,17 @@ void DeprecatedStorageQuota::requestQuota(ScriptState* scriptState,
if (storageType != WebStorageQuotaTypeTemporary &&
storageType != WebStorageQuotaTypePersistent) {
// Unknown storage type is requested.
- executionContext->postTask(TaskType::MiscPlatformAPI, BLINK_FROM_HERE,
- StorageErrorCallback::createSameThreadTask(
- errorCallback, NotSupportedError));
+ TaskRunnerHelper::get(TaskType::MiscPlatformAPI, executionContext)
+ ->postTask(BLINK_FROM_HERE, StorageErrorCallback::createSameThreadTask(
+ errorCallback, NotSupportedError));
return;
}
StorageQuotaClient* client = StorageQuotaClient::from(executionContext);
if (!client) {
- executionContext->postTask(TaskType::MiscPlatformAPI, BLINK_FROM_HERE,
- StorageErrorCallback::createSameThreadTask(
- errorCallback, NotSupportedError));
+ TaskRunnerHelper::get(TaskType::MiscPlatformAPI, executionContext)
+ ->postTask(BLINK_FROM_HERE, StorageErrorCallback::createSameThreadTask(
+ errorCallback, NotSupportedError));
return;
}

Powered by Google App Engine
This is Rietveld 408576698