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

Unified Diff: Source/modules/indexeddb/IDBRequestTest.cpp

Issue 332993002: Replace ContentSecurityPolicy::client() with a method returning an ExecutionContext (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase Created 6 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/core/frame/csp/ContentSecurityPolicy.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/indexeddb/IDBRequestTest.cpp
diff --git a/Source/modules/indexeddb/IDBRequestTest.cpp b/Source/modules/indexeddb/IDBRequestTest.cpp
index a05fa05eee8047609a04224d52fb44a3472d1281..5e130a3ab713f3c2bb662105bf80c0f6347dda56 100644
--- a/Source/modules/indexeddb/IDBRequestTest.cpp
+++ b/Source/modules/indexeddb/IDBRequestTest.cpp
@@ -28,6 +28,7 @@
#include "core/dom/DOMError.h"
#include "core/dom/Document.h"
+#include "core/dom/SecurityContext.h"
#include "core/events/EventQueue.h"
#include "modules/indexeddb/IDBDatabaseCallbacks.h"
#include "modules/indexeddb/IDBKeyRange.h"
@@ -53,7 +54,7 @@ public:
virtual void close() OVERRIDE { }
};
-class NullExecutionContext FINAL : public RefCountedWillBeGarbageCollectedFinalized<NullExecutionContext>, public ExecutionContext {
+class NullExecutionContext FINAL : public RefCountedWillBeGarbageCollectedFinalized<NullExecutionContext>, public SecurityContext, public ExecutionContext {
WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(NullExecutionContext);
public:
NullExecutionContext();
@@ -70,12 +71,22 @@ public:
using RefCounted<NullExecutionContext>::ref;
using RefCounted<NullExecutionContext>::deref;
+ virtual void reportBlockedScriptExecutionToInspector(const String& directiveText) OVERRIDE { }
+
+ virtual SecurityContext& securityContext() { return *this; }
+
virtual void refExecutionContext() OVERRIDE { ref(); }
virtual void derefExecutionContext() OVERRIDE { deref(); }
#endif
+protected:
+ virtual const KURL& virtualURL() const OVERRIDE { return m_dummyURL; }
+ virtual KURL virtualCompleteURL(const String&) const OVERRIDE { return m_dummyURL; }
+
private:
OwnPtrWillBeMember<EventQueue> m_queue;
+
+ KURL m_dummyURL;
};
NullExecutionContext::NullExecutionContext()
« no previous file with comments | « Source/core/frame/csp/ContentSecurityPolicy.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698