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

Unified Diff: chrome/browser/autofill/autofill_profile.cc

Issue 7645038: Autofill: Check for different string sizes when comparing for equality. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Use StringToLowerASCII. Created 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/webdata/web_database_migration_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/autofill/autofill_profile.cc
diff --git a/chrome/browser/autofill/autofill_profile.cc b/chrome/browser/autofill/autofill_profile.cc
index bdeab8370d66091795e05a20be96190330243b81..0cf907b63f04511cc4555e8dd6b43875ea2f1b5b 100644
--- a/chrome/browser/autofill/autofill_profile.cc
+++ b/chrome/browser/autofill/autofill_profile.cc
@@ -543,8 +543,8 @@ struct CaseInsensitiveStringEquals
: public std::binary_function<string16, string16, bool>
{
bool operator()(const string16& x, const string16& y) const {
- return std::equal(x.begin(), x.end(), y.begin(),
- base::CaseInsensitiveCompare<string16::value_type>());
+ if (x.size() != y.size()) return false;
Ilya Sherman 2011/08/17 00:58:55 nit: The size check isn't actually necessary if us
+ return StringToLowerASCII(x) == StringToLowerASCII(y);
}
};
« no previous file with comments | « no previous file | chrome/browser/webdata/web_database_migration_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698