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

Unified Diff: components/autofill/browser/personal_data_manager.h

Issue 13488009: Remove application locale cache in autofill code. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: sync Created 7 years, 8 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 | « components/autofill/browser/form_group.cc ('k') | components/autofill/browser/personal_data_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/autofill/browser/personal_data_manager.h
===================================================================
--- components/autofill/browser/personal_data_manager.h (revision 192613)
+++ components/autofill/browser/personal_data_manager.h (working copy)
@@ -42,7 +42,7 @@
// specific data variant.
typedef std::pair<std::string, size_t> GUIDPair;
- PersonalDataManager();
+ explicit PersonalDataManager(const std::string& app_locale);
virtual ~PersonalDataManager();
// Kicks off asynchronous loading of profiles and credit cards.
@@ -152,8 +152,11 @@
// Also see SetProfile for more details.
virtual void Refresh();
+ const std::string& app_locale() const { return app_locale_; }
+
// Checks suitability of |profile| for adding to the user's set of profiles.
- static bool IsValidLearnableProfile(const AutofillProfile& profile);
+ static bool IsValidLearnableProfile(const AutofillProfile& profile,
+ const std::string& app_locale);
// Merges |profile| into one of the |existing_profiles| if possible; otherwise
// appends |profile| to the end of that list. Fills |merged_profiles| with the
@@ -161,6 +164,7 @@
static bool MergeProfile(
const AutofillProfile& profile,
const std::vector<AutofillProfile*>& existing_profiles,
+ const std::string& app_locale,
std::vector<AutofillProfile>* merged_profiles);
protected:
@@ -261,6 +265,7 @@
ObserverList<PersonalDataManagerObserver> observers_;
private:
+ std::string app_locale_;
// For logging UMA metrics. Overridden by metrics tests.
scoped_ptr<const AutofillMetrics> metric_logger_;
« no previous file with comments | « components/autofill/browser/form_group.cc ('k') | components/autofill/browser/personal_data_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698