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

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

Issue 2338283003: [Payments] Normalize addresses before passing them to merchants. (Closed)
Patch Set: Created 4 years, 3 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 bc9ff63de52708bc2d469d5f6079c39fc220f1c5..c12d289ac978dab6cd8eb8bdc7b5e556dcc3b464 100644
--- a/components/autofill/core/browser/personal_data_manager.h
+++ b/components/autofill/core/browser/personal_data_manager.h
@@ -24,6 +24,7 @@
#include "components/keyed_service/core/keyed_service.h"
#include "components/prefs/pref_member.h"
#include "components/webdata/common/web_data_service_consumer.h"
+#include "net/url_request/url_fetcher_delegate.h"
class AccountTrackerService;
class Browser;
@@ -31,6 +32,11 @@ class PrefService;
class RemoveAutofillTester;
class SigninManagerBase;
+namespace net {
+class URLFetcher;
+class URLRequestContextGetter;
+}
+
namespace sync_driver {
class SyncService;
}
@@ -61,7 +67,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 +267,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 +505,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);
};

Powered by Google App Engine
This is Rietveld 408576698