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

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

Issue 17885002: Use toDocument instead of static_cast<Document*>. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: 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
« no previous file with comments | « Source/WebKit/chromium/src/SharedWorkerRepository.cpp ('k') | Source/WebKit/chromium/src/WebDocument.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/WebKit/chromium/src/StorageQuotaChromium.cpp
diff --git a/Source/WebKit/chromium/src/StorageQuotaChromium.cpp b/Source/WebKit/chromium/src/StorageQuotaChromium.cpp
index 8e20649b0c732e6bcd9cf48a18ca380a2f790ff0..913f741ecc505b787dbb453ce52b96ab0e3ae8e2 100644
--- a/Source/WebKit/chromium/src/StorageQuotaChromium.cpp
+++ b/Source/WebKit/chromium/src/StorageQuotaChromium.cpp
@@ -75,7 +75,7 @@ void StorageQuota::queryUsageAndQuota(ScriptExecutionContext* scriptExecutionCon
return;
}
if (scriptExecutionContext->isDocument()) {
- Document* document = static_cast<Document*>(scriptExecutionContext);
+ Document* document = toDocument(scriptExecutionContext);
WebFrameImpl* webFrame = WebFrameImpl::fromFrame(document->frame());
webFrame->client()->queryStorageUsageAndQuota(webFrame, storageType, new WebStorageQuotaCallbacksImpl(successCallback, errorCallback));
} else {
@@ -95,7 +95,7 @@ void StorageQuota::requestQuota(ScriptExecutionContext* scriptExecutionContext,
return;
}
if (scriptExecutionContext->isDocument()) {
- Document* document = static_cast<Document*>(scriptExecutionContext);
+ Document* document = toDocument(scriptExecutionContext);
WebFrameImpl* webFrame = WebFrameImpl::fromFrame(document->frame());
webFrame->client()->requestStorageQuota(webFrame, storageType, newQuotaInBytes, new WebStorageQuotaCallbacksImpl(successCallback, errorCallback));
} else {
« no previous file with comments | « Source/WebKit/chromium/src/SharedWorkerRepository.cpp ('k') | Source/WebKit/chromium/src/WebDocument.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698