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

Unified Diff: chrome/browser/autofill/phone_number.h

Issue 7044102: Another performance improvement for phone library - at least +25% to previous cl (982ms for 100 i... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 6 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: chrome/browser/autofill/phone_number.h
===================================================================
--- chrome/browser/autofill/phone_number.h (revision 89550)
+++ chrome/browser/autofill/phone_number.h (working copy)
@@ -13,6 +13,7 @@
#include "base/string16.h"
#include "chrome/browser/autofill/autofill_type.h"
#include "chrome/browser/autofill/form_group.h"
+#include "chrome/browser/autofill/phone_number_i18n.h"
// A form group that stores phone number information.
class PhoneNumber : public FormGroup {
@@ -84,11 +85,6 @@
static void StripPunctuation(string16* number);
- void ClearCachedNumbers() const;
- // Updates cached parsed parts of the number. Returns false only if there was
- // parsing involved and it failed.
- bool UpdateCacheIfNeeded() const;
-
// Phone group - currently it is PHONE_HOME and PHONE_FAX.
AutofillType::FieldTypeGroup phone_group_;
// Locale for phone normalizing.
@@ -96,10 +92,8 @@
// The phone number.
string16 number_;
- // Cached parsed parts of the number.
- mutable string16 cached_country_code_;
- mutable string16 cached_city_code_;
- mutable string16 cached_local_number_;
+ // Cached number.
+ autofill_i18n::PhoneObject cached_parsed_phone_;
};
#endif // CHROME_BROWSER_AUTOFILL_PHONE_NUMBER_H_
« no previous file with comments | « no previous file | chrome/browser/autofill/phone_number.cc » ('j') | chrome/browser/autofill/phone_number_i18n.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698