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

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

Issue 7066043: Cache Autofill heuristics regexes (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 7 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 | « chrome/browser/autofill/form_field.cc ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/autofill/personal_data_manager.cc
diff --git a/chrome/browser/autofill/personal_data_manager.cc b/chrome/browser/autofill/personal_data_manager.cc
index d3d78add2cec7cef9a15a3e47df4b5f50f452c55..d62c8ba318f4f4bd9c559143b9ba79c30695da4f 100644
--- a/chrome/browser/autofill/personal_data_manager.cc
+++ b/chrome/browser/autofill/personal_data_manager.cc
@@ -13,7 +13,7 @@
#include "chrome/browser/autofill/autofill-inl.h"
#include "chrome/browser/autofill/autofill_field.h"
#include "chrome/browser/autofill/autofill_metrics.h"
-#include "chrome/browser/autofill/autofill_scanner.h"
+#include "chrome/browser/autofill/autofill_regexes.h"
#include "chrome/browser/autofill/form_structure.h"
#include "chrome/browser/autofill/phone_number.h"
#include "chrome/browser/autofill/phone_number_i18n.h"
@@ -76,14 +76,14 @@ bool IsValidEmail(const string16& value) {
// This regex is more permissive than the official rfc2822 spec on the
// subject, but it does reject obvious non-email addresses.
const string16 kEmailPattern = ASCIIToUTF16("^[^@]+@[^@]+\\.[a-z]{2,6}$");
- return autofill::MatchString(value, kEmailPattern);
+ return autofill::MatchesPattern(value, kEmailPattern);
}
// Valid for US zip codes only.
bool IsValidZip(const string16& value) {
// Basic US zip code matching.
const string16 kZipPattern = ASCIIToUTF16("^\\d{5}(-\\d{4})?$");
- return autofill::MatchString(value, kZipPattern);
+ return autofill::MatchesPattern(value, kZipPattern);
}
// Returns true if minimum requirements for import of a given |profile| have
« no previous file with comments | « chrome/browser/autofill/form_field.cc ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698