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

Unified Diff: third_party/WebKit/Source/web/IndexedDBClientImpl.cpp

Issue 2786673002: Separate ContentSettingsClient out from LocalFrameClient (Closed)
Patch Set: added class-level comment Created 3 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
Index: third_party/WebKit/Source/web/IndexedDBClientImpl.cpp
diff --git a/third_party/WebKit/Source/web/IndexedDBClientImpl.cpp b/third_party/WebKit/Source/web/IndexedDBClientImpl.cpp
index 61f9374e65f20d210f2d67cb71c6d9d88fb9aefb..ce47fa543a27936a5264a91ab584920c3d1bbc74 100644
--- a/third_party/WebKit/Source/web/IndexedDBClientImpl.cpp
+++ b/third_party/WebKit/Source/web/IndexedDBClientImpl.cpp
@@ -31,10 +31,10 @@
#include "bindings/core/v8/WorkerOrWorkletScriptController.h"
#include "core/dom/Document.h"
#include "core/dom/ExecutionContext.h"
+#include "core/frame/ContentSettingsClient.h"
#include "core/workers/WorkerGlobalScope.h"
#include "platform/weborigin/SecurityOrigin.h"
#include "public/platform/WebSecurityOrigin.h"
-#include "public/web/WebContentSettingsClient.h"
#include "public/web/WebKit.h"
#include "web/WebLocalFrameImpl.h"
#include "web/WorkerContentSettingsClient.h"
@@ -61,15 +61,13 @@ bool IndexedDBClientImpl::allowIndexedDB(ExecutionContext* context,
SECURITY_DCHECK(context->isDocument() || context->isWorkerGlobalScope());
if (context->isDocument()) {
- WebSecurityOrigin origin(context->getSecurityOrigin());
Document* document = toDocument(context);
- WebLocalFrameImpl* webFrame =
- WebLocalFrameImpl::fromFrame(document->frame());
- if (!webFrame)
+ LocalFrame* frame = document->frame();
+ if (!frame)
return false;
- if (webFrame->contentSettingsClient())
- return webFrame->contentSettingsClient()->allowIndexedDB(name, origin);
- return true;
+ DCHECK(frame->contentSettingsClient());
+ return frame->contentSettingsClient()->allowIndexedDB(
+ name, context->getSecurityOrigin());
}
WorkerGlobalScope& workerGlobalScope = *toWorkerGlobalScope(context);
« no previous file with comments | « third_party/WebKit/Source/web/EditorClientImpl.cpp ('k') | third_party/WebKit/Source/web/LocalFileSystemClient.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698