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

Side by Side Diff: Source/core/page/UserContentURLPattern.cpp

Issue 22572005: Remove all uses of the ASCIILiteral class. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rm it from wtf Created 7 years, 4 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2009, 2010 Apple Inc. All rights reserved. 2 * Copyright (C) 2009, 2010 Apple Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 break; 57 break;
58 } 58 }
59 } 59 }
60 } 60 }
61 61
62 return matchesWhitelist && !matchesBlacklist; 62 return matchesWhitelist && !matchesBlacklist;
63 } 63 }
64 64
65 bool UserContentURLPattern::parse(const String& pattern) 65 bool UserContentURLPattern::parse(const String& pattern)
66 { 66 {
67 DEFINE_STATIC_LOCAL(const String, schemeSeparator, (ASCIILiteral("://"))); 67 DEFINE_STATIC_LOCAL(const String, schemeSeparator, ("://"));
68 68
69 size_t schemeEndPos = pattern.find(schemeSeparator); 69 size_t schemeEndPos = pattern.find(schemeSeparator);
70 if (schemeEndPos == notFound) 70 if (schemeEndPos == notFound)
71 return false; 71 return false;
72 72
73 m_scheme = pattern.left(schemeEndPos); 73 m_scheme = pattern.left(schemeEndPos);
74 74
75 unsigned hostStartPos = schemeEndPos + schemeSeparator.length(); 75 unsigned hostStartPos = schemeEndPos + schemeSeparator.length();
76 if (hostStartPos >= pattern.length()) 76 if (hostStartPos >= pattern.length())
77 return false; 77 return false;
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
225 } 225 }
226 }; 226 };
227 227
228 bool UserContentURLPattern::matchesPath(const KURL& test) const 228 bool UserContentURLPattern::matchesPath(const KURL& test) const
229 { 229 {
230 MatchTester match(m_path, test.path()); 230 MatchTester match(m_path, test.path());
231 return match.test(); 231 return match.test();
232 } 232 }
233 233
234 } // namespace WebCore 234 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/page/PageVisibilityState.cpp ('k') | Source/core/platform/animation/CSSAnimationData.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698