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

Unified Diff: components/autofill/core/browser/autofill_profile_comparator.cc

Issue 2127373006: Use base::StartWith() in more places when appropriate. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase, resolve conflict Created 4 years, 5 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: components/autofill/core/browser/autofill_profile_comparator.cc
diff --git a/components/autofill/core/browser/autofill_profile_comparator.cc b/components/autofill/core/browser/autofill_profile_comparator.cc
index d4c500308a85a77b669e972a8e9d4aae67e4b97c..38831cd4b04dc2c623020d88a3d3223f8733280a 100644
--- a/components/autofill/core/browser/autofill_profile_comparator.cc
+++ b/components/autofill/core/browser/autofill_profile_comparator.cc
@@ -309,7 +309,7 @@ bool AutofillProfileComparator::MergePhoneNumbers(
// include the country code prefix.
if (merged_number.country_code() == 1 &&
merged_number.national_number() <= 9999999 &&
- new_number.find("+1") == 0) {
+ base::StartsWith(new_number, "+1", base::CompareCase::SENSITIVE)) {
size_t offset = 2; // The char just after "+1".
while (offset < new_number.size() &&
base::IsAsciiWhitespace(new_number[offset])) {

Powered by Google App Engine
This is Rietveld 408576698