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

Unified Diff: Source/core/platform/ContentType.cpp

Issue 23464095: WTF::notFound looks too much like a local variable. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 3 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
« no previous file with comments | « Source/core/page/WindowFeatures.cpp ('k') | Source/core/platform/Length.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/platform/ContentType.cpp
diff --git a/Source/core/platform/ContentType.cpp b/Source/core/platform/ContentType.cpp
index c1b0ebd07dd8212511543c68472e1d08fc674506..7136ea538bbcbd2b56e7750a89cdaed3da52d61d 100644
--- a/Source/core/platform/ContentType.cpp
+++ b/Source/core/platform/ContentType.cpp
@@ -42,18 +42,18 @@ String ContentType::parameter(const String& parameterName) const
// a MIME type can have one or more "param=value" after a semi-colon, and separated from each other by semi-colons
size_t semi = strippedType.find(';');
- if (semi != notFound) {
+ if (semi != kNotFound) {
size_t start = strippedType.find(parameterName, semi + 1, false);
- if (start != notFound) {
+ if (start != kNotFound) {
start = strippedType.find('=', start + parameterName.length());
- if (start != notFound) {
+ if (start != kNotFound) {
size_t quote = strippedType.find('\"', start + 1);
size_t end = strippedType.find('\"', start + 2);
- if (quote != notFound && end != notFound)
+ if (quote != kNotFound && end != kNotFound)
start = quote;
else {
end = strippedType.find(';', start + 1);
- if (end == notFound)
+ if (end == kNotFound)
end = strippedType.length();
}
parameterValue = strippedType.substring(start + 1, end - (start + 1)).stripWhiteSpace();
@@ -70,7 +70,7 @@ String ContentType::type() const
// "type" can have parameters after a semi-colon, strip them
size_t semi = strippedType.find(';');
- if (semi != notFound)
+ if (semi != kNotFound)
strippedType = strippedType.left(semi).stripWhiteSpace();
return strippedType;
« no previous file with comments | « Source/core/page/WindowFeatures.cpp ('k') | Source/core/platform/Length.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698