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

Unified Diff: Source/core/html/EmailInputType.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/editing/markup.cpp ('k') | Source/core/html/FormController.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/EmailInputType.cpp
diff --git a/Source/core/html/EmailInputType.cpp b/Source/core/html/EmailInputType.cpp
index ef19641c22859388d58501cc8599e8c027ec49ff..90ae4bc62cb3d375e7e003cac26f81cb0159fe9d 100644
--- a/Source/core/html/EmailInputType.cpp
+++ b/Source/core/html/EmailInputType.cpp
@@ -57,7 +57,7 @@ static String convertEmailAddressToASCII(const String& address)
return address;
size_t atPosition = address.find('@');
- if (atPosition == notFound)
+ if (atPosition == kNotFound)
return address;
UErrorCode error = U_ZERO_ERROR;
@@ -78,10 +78,10 @@ String EmailInputType::convertEmailAddressToUnicode(const String& address) const
return address;
size_t atPosition = address.find('@');
- if (atPosition == notFound)
+ if (atPosition == kNotFound)
return address;
- if (address.find("xn--", atPosition + 1) == notFound)
+ if (address.find("xn--", atPosition + 1) == kNotFound)
return address;
if (!chrome())
@@ -100,7 +100,7 @@ static bool isInvalidLocalPartCharacter(UChar ch)
if (!isASCII(ch))
return true;
DEFINE_STATIC_LOCAL(const String, validCharacters, (localPartCharacters));
- return validCharacters.find(toASCIILower(ch)) == notFound;
+ return validCharacters.find(toASCIILower(ch)) == kNotFound;
}
static bool isInvalidDomainCharacter(UChar ch)
@@ -116,7 +116,7 @@ static bool checkValidDotUsage(const String& domain)
return true;
if (domain[0] == '.' || domain[domain.length() - 1] == '.')
return false;
- return domain.find("..") == notFound;
+ return domain.find("..") == kNotFound;
}
static bool isValidEmailAddress(const String& address)
@@ -186,7 +186,7 @@ String EmailInputType::typeMismatchText() const
return locale().queryString(WebLocalizedString::ValidationTypeMismatchForEmailEmpty);
String atSign = String("@");
size_t atIndex = invalidAddress.find('@');
- if (atIndex == notFound)
+ if (atIndex == kNotFound)
return locale().queryString(WebLocalizedString::ValidationTypeMismatchForEmailNoAtSign, atSign, invalidAddress);
// We check validity against an ASCII value because of difficulty to check
// invalid characters. However we should show Unicode value.
@@ -198,18 +198,18 @@ String EmailInputType::typeMismatchText() const
if (domain.isEmpty())
return locale().queryString(WebLocalizedString::ValidationTypeMismatchForEmailEmptyDomain, atSign, unicodeAddress);
size_t invalidCharIndex = localPart.find(isInvalidLocalPartCharacter);
- if (invalidCharIndex != notFound) {
+ if (invalidCharIndex != kNotFound) {
unsigned charLength = U_IS_LEAD(localPart[invalidCharIndex]) ? 2 : 1;
return locale().queryString(WebLocalizedString::ValidationTypeMismatchForEmailInvalidLocal, atSign, localPart.substring(invalidCharIndex, charLength));
}
invalidCharIndex = domain.find(isInvalidDomainCharacter);
- if (invalidCharIndex != notFound) {
+ if (invalidCharIndex != kNotFound) {
unsigned charLength = U_IS_LEAD(domain[invalidCharIndex]) ? 2 : 1;
return locale().queryString(WebLocalizedString::ValidationTypeMismatchForEmailInvalidDomain, atSign, domain.substring(invalidCharIndex, charLength));
}
if (!checkValidDotUsage(domain)) {
size_t atIndexInUnicode = unicodeAddress.find('@');
- ASSERT(atIndexInUnicode != notFound);
+ ASSERT(atIndexInUnicode != kNotFound);
return locale().queryString(WebLocalizedString::ValidationTypeMismatchForEmailInvalidDots, String("."), unicodeAddress.substring(atIndexInUnicode + 1));
}
if (element()->multiple())
« no previous file with comments | « Source/core/editing/markup.cpp ('k') | Source/core/html/FormController.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698