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

Unified Diff: third_party/WebKit/WebCore/platform/KURLGoogle.cpp

Issue 858001: Merge WebKit r55822:... (Closed) Base URL: svn://chrome-svn/chrome/branches/249/src/
Patch Set: Created 10 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/WebCore/platform/KURLGoogle.cpp
===================================================================
--- third_party/WebKit/WebCore/platform/KURLGoogle.cpp (revision 41242)
+++ third_party/WebKit/WebCore/platform/KURLGoogle.cpp (working copy)
@@ -968,12 +968,10 @@
{
// Do the comparison without making a new string object.
assertProtocolIsGood(protocol);
- for (int i = 0; ; ++i) {
- if (!protocol[i])
- return url[i] == ':';
- if (toASCIILower(url[i]) != protocol[i])
- return false;
- }
+
+ // Check the scheme like GURL does.
+ return url_util::FindAndCompareScheme(url.characters(), url.length(),
+ protocol, NULL);
}
inline bool KURL::protocolIs(const String& string, const char* protocol)
« no previous file with comments | « third_party/WebKit/LayoutTests/http/tests/security/xss-DENIED-window-open-javascript-url-leading-format-char-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698