Index: third_party/WebKit/Source/modules/webdatabase/DatabaseClient.cpp |
diff --git a/third_party/WebKit/Source/modules/webdatabase/DatabaseClient.cpp b/third_party/WebKit/Source/modules/webdatabase/DatabaseClient.cpp |
index 19719bb4ff904291123dddb35362a554894a69be..375541c8c382404faa3b57af1d4eb979a93b1743 100644 |
--- a/third_party/WebKit/Source/modules/webdatabase/DatabaseClient.cpp |
+++ b/third_party/WebKit/Source/modules/webdatabase/DatabaseClient.cpp |
@@ -31,6 +31,8 @@ |
#include "modules/webdatabase/DatabaseClient.h" |
#include "core/dom/Document.h" |
+#include "core/frame/ContentSettingsClient.h" |
+#include "core/frame/LocalFrame.h" |
#include "core/page/Page.h" |
#include "modules/webdatabase/Database.h" |
#include "modules/webdatabase/InspectorDatabaseAgent.h" |
@@ -57,6 +59,20 @@ const char* DatabaseClient::supplementName() { |
return "DatabaseClient"; |
} |
+bool DatabaseClient::allowDatabase(ExecutionContext* context, |
+ const String& name, |
+ const String& displayName, |
+ unsigned estimatedSize) { |
+ DCHECK(context->isContextThread()); |
+ Document* document = toDocument(context); |
+ DCHECK(document->frame()); |
+ if (document->frame()->contentSettingsClient()) { |
+ return document->frame()->contentSettingsClient()->allowDatabase( |
+ name, displayName, estimatedSize); |
+ } |
+ return true; |
+} |
+ |
void DatabaseClient::didOpenDatabase(blink::Database* database, |
const String& domain, |
const String& name, |