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

Unified Diff: third_party/WebKit/Source/core/frame/csp/ContentSecurityPolicy.h

Issue 2785463002: CSP: Don't override the location set in reportViolationWithLocation. (Closed)
Patch Set: Do not use a default value because of forward declaration. 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/core/frame/csp/ContentSecurityPolicy.h
diff --git a/third_party/WebKit/Source/core/frame/csp/ContentSecurityPolicy.h b/third_party/WebKit/Source/core/frame/csp/ContentSecurityPolicy.h
index dc1c4ae3005c94bd541de57ffe34d3d3fde75d91..84ad9bb2d7062ab2c4cacb9443c93dd66e4486c9 100644
--- a/third_party/WebKit/Source/core/frame/csp/ContentSecurityPolicy.h
+++ b/third_party/WebKit/Source/core/frame/csp/ContentSecurityPolicy.h
@@ -29,6 +29,7 @@
#include <memory>
#include <utility>
#include "bindings/core/v8/ScriptState.h"
+#include "bindings/core/v8/SourceLocation.h"
#include "core/CoreExport.h"
#include "core/dom/ExecutionContext.h"
#include "core/dom/SecurityContext.h"
@@ -64,6 +65,7 @@ class KURL;
class ResourceRequest;
class SecurityOrigin;
class SecurityPolicyViolationEventInit;
+class SourceLocation;
typedef int SandboxFlags;
typedef HeapVector<Member<CSPDirectiveList>> CSPDirectiveListVector;
@@ -329,6 +331,8 @@ class CORE_EXPORT ContentSecurityPolicy
// no frame is passed in, the report will be sent via this object's
// |m_executionContext| (or dropped on the floor if no such context is
// available).
+ // If |sourceLocation| is not set, the source location will be the context's
+ // current location.
void reportViolation(const String& directiveText,
const DirectiveType& effectiveType,
const String& consoleMessage,
@@ -337,9 +341,9 @@ class CORE_EXPORT ContentSecurityPolicy
const String& header,
ContentSecurityPolicyHeaderType,
ViolationType,
+ std::unique_ptr<SourceLocation>,
LocalFrame* = nullptr,
RedirectStatus = RedirectStatus::FollowedRedirect,
- int contextLine = 0,
Element* = nullptr,
const String& source = emptyString);

Powered by Google App Engine
This is Rietveld 408576698