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

Unified Diff: third_party/WebKit/Source/core/frame/csp/CSPSource.cpp

Issue 2146163003: Use StringView for startsWith and endsWith. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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/CSPSource.cpp
diff --git a/third_party/WebKit/Source/core/frame/csp/CSPSource.cpp b/third_party/WebKit/Source/core/frame/csp/CSPSource.cpp
index b4283a13f7a3968de43ad915b335f1d7721270b7..cb520195db732f469bbc8ccbe83b605b27efe705 100644
--- a/third_party/WebKit/Source/core/frame/csp/CSPSource.cpp
+++ b/third_party/WebKit/Source/core/frame/csp/CSPSource.cpp
@@ -53,7 +53,7 @@ bool CSPSource::hostMatches(const KURL& url) const
bool equalHosts = equalIgnoringCase(host, m_host);
if (m_hostWildcard == HasWildcard) {
- match = host.endsWith("." + m_host, TextCaseInsensitive);
+ match = host.endsWith(String("." + m_host), TextCaseInsensitive);
esprehn 2016/07/13 23:42:55 a + b returns a StringAppend, which can't be conve
// Chrome used to, incorrectly, match *.x.y to x.y. This was fixed, but
// the following count measures when a match fails that would have

Powered by Google App Engine
This is Rietveld 408576698