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

Unified Diff: Source/WebKit/chromium/src/StorageQuotaChromium.cpp

Issue 17648006: Rename WorkerContext to WorkerGlobalScope (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase on master Created 7 years, 6 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: Source/WebKit/chromium/src/StorageQuotaChromium.cpp
diff --git a/Source/WebKit/chromium/src/StorageQuotaChromium.cpp b/Source/WebKit/chromium/src/StorageQuotaChromium.cpp
index d75282684ec11ee9bd177b40e11836b6087a4ba8..8e20649b0c732e6bcd9cf48a18ca380a2f790ff0 100644
--- a/Source/WebKit/chromium/src/StorageQuotaChromium.cpp
+++ b/Source/WebKit/chromium/src/StorageQuotaChromium.cpp
@@ -40,7 +40,7 @@
#include "core/dom/Document.h"
#include "core/dom/ExceptionCode.h"
#include "core/dom/ScriptExecutionContext.h"
-#include "core/workers/WorkerContext.h"
+#include "core/workers/WorkerGlobalScope.h"
#include "core/workers/WorkerThread.h"
#include "modules/quota/StorageErrorCallback.h"
#include "modules/quota/StorageQuotaCallback.h"
@@ -53,13 +53,13 @@ namespace WebCore {
static void queryUsageAndQuotaFromWorker(WebCommonWorkerClient* commonClient, WebStorageQuotaType storageType, WebStorageQuotaCallbacksImpl* callbacks)
{
- WorkerContext* workerContext = WorkerScriptController::controllerForContext()->workerContext();
- WebCore::WorkerThread* workerThread = workerContext->thread();
+ WorkerGlobalScope* workerGlobalScope = WorkerScriptController::controllerForContext()->workerGlobalScope();
+ WebCore::WorkerThread* workerThread = workerGlobalScope->thread();
WebCore::WorkerLoaderProxy* workerLoaderProxy = &workerThread->workerLoaderProxy();
String mode = "queryUsageAndQuotaMode" + String::number(workerThread->runLoop().createUniqueId());
- RefPtr<WorkerStorageQuotaCallbacksBridge> bridge = WorkerStorageQuotaCallbacksBridge::create(workerLoaderProxy, workerContext, callbacks);
+ RefPtr<WorkerStorageQuotaCallbacksBridge> bridge = WorkerStorageQuotaCallbacksBridge::create(workerLoaderProxy, workerGlobalScope, callbacks);
// The bridge is held by the task that is created in posted to the main thread by this method.
bridge->postQueryUsageAndQuotaToMainThread(commonClient, storageType, mode);
@@ -79,8 +79,8 @@ void StorageQuota::queryUsageAndQuota(ScriptExecutionContext* scriptExecutionCon
WebFrameImpl* webFrame = WebFrameImpl::fromFrame(document->frame());
webFrame->client()->queryStorageUsageAndQuota(webFrame, storageType, new WebStorageQuotaCallbacksImpl(successCallback, errorCallback));
} else {
- WorkerContext* workerContext = static_cast<WorkerContext*>(scriptExecutionContext);
- WebWorkerBase* webWorker = static_cast<WebWorkerBase*>(workerContext->thread()->workerLoaderProxy().toWebWorkerBase());
+ WorkerGlobalScope* workerGlobalScope = static_cast<WorkerGlobalScope*>(scriptExecutionContext);
+ WebWorkerBase* webWorker = static_cast<WebWorkerBase*>(workerGlobalScope->thread()->workerLoaderProxy().toWebWorkerBase());
queryUsageAndQuotaFromWorker(webWorker->commonClient(), storageType, new WebStorageQuotaCallbacksImpl(successCallback, errorCallback));
}
}
« no previous file with comments | « Source/WebKit/chromium/src/SharedWorkerRepository.cpp ('k') | Source/WebKit/chromium/src/WebFileSystemCallbacksImpl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698