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

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

Issue 2589273003: CSP: fix bugs in parseHost (+ add unit test) (Closed)
Patch Set: Addressed comments. Created 4 years 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 | « no previous file | third_party/WebKit/Source/core/frame/csp/SourceListDirective.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/frame/csp/SourceListDirective.h
diff --git a/third_party/WebKit/Source/core/frame/csp/SourceListDirective.h b/third_party/WebKit/Source/core/frame/csp/SourceListDirective.h
index c9a78360faf0f7f0c684f52ffdf9dc09c6202272..425680c9acde18c6058bbd4ef227ece2f08a5c86 100644
--- a/third_party/WebKit/Source/core/frame/csp/SourceListDirective.h
+++ b/third_party/WebKit/Source/core/frame/csp/SourceListDirective.h
@@ -59,6 +59,7 @@ class CORE_EXPORT SourceListDirective final : public CSPDirective {
FRIEND_TEST_ALL_PREFIXES(SourceListDirectiveTest, GetIntersectNonces);
FRIEND_TEST_ALL_PREFIXES(SourceListDirectiveTest, GetIntersectHashes);
FRIEND_TEST_ALL_PREFIXES(SourceListDirectiveTest, GetSources);
+ FRIEND_TEST_ALL_PREFIXES(SourceListDirectiveTest, ParseHost);
FRIEND_TEST_ALL_PREFIXES(CSPDirectiveListTest, GetSourceVector);
FRIEND_TEST_ALL_PREFIXES(CSPDirectiveListTest, OperativeDirectiveGivenType);
@@ -71,10 +72,10 @@ class CORE_EXPORT SourceListDirective final : public CSPDirective {
CSPSource::WildcardDisposition&,
CSPSource::WildcardDisposition&);
bool parseScheme(const UChar* begin, const UChar* end, String& scheme);
- bool parseHost(const UChar* begin,
- const UChar* end,
- String& host,
- CSPSource::WildcardDisposition&);
+ static bool parseHost(const UChar* begin,
+ const UChar* end,
+ String& host,
+ CSPSource::WildcardDisposition&);
bool parsePort(const UChar* begin,
const UChar* end,
int& port,
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/frame/csp/SourceListDirective.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698