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

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

Issue 2786673002: Separate ContentSettingsClient out from LocalFrameClient (Closed)
Patch Set: fix Created 3 years, 9 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..b72a63b6dbc211f4756c367de9c46c986c5e10cc 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,14 +61,14 @@ 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);
+ if (frame->contentSettingsClient()) {
dcheng 2017/04/02 05:26:19 If we have a frame, I think we can assume it is no
kinuko 2017/04/03 15:15:06 Done.
+ return frame->contentSettingsClient()->allowIndexedDB(
+ name, context->getSecurityOrigin());
+ }
return true;
}

Powered by Google App Engine
This is Rietveld 408576698