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 bc9ff63de52708bc2d469d5f6079c39fc220f1c5..2109181bb315c8cce737bf13e417b143274df125 100644 |
--- a/components/autofill/core/browser/personal_data_manager.h |
+++ b/components/autofill/core/browser/personal_data_manager.h |
@@ -31,6 +31,11 @@ class PrefService; |
class RemoveAutofillTester; |
class SigninManagerBase; |
+namespace net { |
+class URLFetcher; |
+class URLRequestContextGetter; |
+} |
+ |
namespace sync_driver { |
class SyncService; |
} |
@@ -61,7 +66,8 @@ class PersonalDataManager : public KeyedService, |
public WebDataServiceConsumer, |
public AutofillWebDataServiceObserverOnUIThread { |
public: |
- explicit PersonalDataManager(const std::string& app_locale); |
+ explicit PersonalDataManager(const std::string& app_locale, |
+ net::URLRequestContextGetter* context_getter); |
~PersonalDataManager() override; |
// Kicks off asynchronous loading of profiles and credit cards. |
@@ -260,6 +266,11 @@ class PersonalDataManager : public KeyedService, |
NotifyPersonalDataChanged(); |
} |
+ // Returns the class used to fetch the address validation rules. |
+ net::URLRequestContextGetter* GetURLRequestContextGetter() const { |
+ return context_getter_.get(); |
+ } |
+ |
protected: |
// Only PersonalDataManagerFactory and certain tests can create instances of |
// PersonalDataManager. |
@@ -493,6 +504,10 @@ class PersonalDataManager : public KeyedService, |
// performed on the next data refresh. |
bool is_autofill_profile_dedupe_pending_ = false; |
+ // The context for the request to be used to fetch libaddressinput's address |
+ // validation rules. |
+ scoped_refptr<net::URLRequestContextGetter> context_getter_; |
+ |
DISALLOW_COPY_AND_ASSIGN(PersonalDataManager); |
}; |