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

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

Issue 106033007: Disable wallet in countries where it's not supported, take 2. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: sync Created 6 years, 11 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/personal_data_manager.h
diff --git a/components/autofill/core/browser/personal_data_manager.h b/components/autofill/core/browser/personal_data_manager.h
index 76452b39575e096f10bf67729c5c4b28891cbc60..e44c85dc9621f97096222b97f2e0f9fe319ec9ae 100644
--- a/components/autofill/core/browser/personal_data_manager.h
+++ b/components/autofill/core/browser/personal_data_manager.h
@@ -184,6 +184,12 @@ class PersonalDataManager : public WebDataServiceConsumer,
const std::string& app_locale,
std::vector<AutofillProfile>* merged_profiles);
+ // Returns true if |country_code| is a country that the user is likely to
+ // be associated with the user. More concretely, it checks if there are any
+ // addresses with this country or if the user's system timezone is in the
+ // given country.
+ virtual bool IsCountryOfInterest(const std::string& country_code) const;
+
// Returns our best guess for the country a user is likely to use when
// inputting a new address. The value is calculated once and cached, so it
// will only update when Chrome is restarted.
@@ -255,6 +261,9 @@ class PersonalDataManager : public WebDataServiceConsumer,
// Returns the value of the AutofillEnabled pref.
virtual bool IsAutofillEnabled() const;
+ // Overrideable for testing.
+ virtual std::string CountryCodeForCurrentTimezone() const;
+
// For tests.
const AutofillMetrics* metric_logger() const { return metric_logger_.get(); }

Powered by Google App Engine
This is Rietveld 408576698