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

Unified Diff: Source/core/frame/ContentSecurityPolicy.h

Issue 183883004: Let ContentSecurityPolicy shared between imports and the master. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Adding guardRef()/guardDeref() Created 6 years, 10 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/dom/SecurityContext.cpp ('k') | Source/core/html/imports/HTMLImportChild.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/frame/ContentSecurityPolicy.h
diff --git a/Source/core/frame/ContentSecurityPolicy.h b/Source/core/frame/ContentSecurityPolicy.h
index ab122c27dc8f3948d86e52d1ed90bb8c373577c4..6fc26530165d13c045bcbc07c976d3e5fdefc260 100644
--- a/Source/core/frame/ContentSecurityPolicy.h
+++ b/Source/core/frame/ContentSecurityPolicy.h
@@ -32,6 +32,8 @@
#include "platform/weborigin/ReferrerPolicy.h"
#include "wtf/HashSet.h"
#include "wtf/PassOwnPtr.h"
+#include "wtf/PassRefPtr.h"
+#include "wtf/RefCounted.h"
#include "wtf/Vector.h"
#include "wtf/text/StringHash.h"
#include "wtf/text/TextPosition.h"
@@ -54,12 +56,12 @@ class SecurityOrigin;
typedef int SandboxFlags;
typedef Vector<OwnPtr<CSPDirectiveList> > CSPDirectiveListVector;
-class ContentSecurityPolicy {
+class ContentSecurityPolicy : public RefCounted<ContentSecurityPolicy> {
WTF_MAKE_FAST_ALLOCATED;
public:
- static PassOwnPtr<ContentSecurityPolicy> create(ExecutionContextClient* client)
+ static PassRefPtr<ContentSecurityPolicy> create(ExecutionContextClient* client)
{
- return adoptPtr(new ContentSecurityPolicy(client));
+ return adoptRef(new ContentSecurityPolicy(client));
}
~ContentSecurityPolicy();
« no previous file with comments | « Source/core/dom/SecurityContext.cpp ('k') | Source/core/html/imports/HTMLImportChild.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698