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

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

Issue 2338283003: [Payments] Normalize addresses before passing them to merchants. (Closed)
Patch Set: import order Created 4 years, 2 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/core/browser/autofill_manager.cc ('k') | third_party/libaddressinput/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..b65e64aeffcfd5a940b69845267d8a9abb37c59b 100644
--- a/components/autofill/core/browser/personal_data_manager.h
+++ b/components/autofill/core/browser/personal_data_manager.h
@@ -24,6 +24,9 @@
#include "components/keyed_service/core/keyed_service.h"
#include "components/prefs/pref_member.h"
#include "components/webdata/common/web_data_service_consumer.h"
+#if defined(OS_ANDROID)
+#include "net/url_request/url_request_context_getter.h"
+#endif
class AccountTrackerService;
class Browser;
@@ -260,6 +263,20 @@ class PersonalDataManager : public KeyedService,
NotifyPersonalDataChanged();
}
+#if defined(OS_ANDROID)
+ // Sets the URL request context getter to be used when normalizing addresses
+ // with libaddressinput's address validator.
+ void SetURLRequestContextGetter(
+ net::URLRequestContextGetter* context_getter) {
+ context_getter_ = context_getter;
+ }
+
+ // Returns the class used to fetch the address validation rules.
+ net::URLRequestContextGetter* GetURLRequestContextGetter() const {
+ return context_getter_.get();
+ }
+#endif
+
protected:
// Only PersonalDataManagerFactory and certain tests can create instances of
// PersonalDataManager.
@@ -493,6 +510,12 @@ class PersonalDataManager : public KeyedService,
// performed on the next data refresh.
bool is_autofill_profile_dedupe_pending_ = false;
+#if defined(OS_ANDROID)
+ // The context for the request to be used to fetch libaddressinput's address
+ // validation rules.
+ scoped_refptr<net::URLRequestContextGetter> context_getter_;
+#endif
+
DISALLOW_COPY_AND_ASSIGN(PersonalDataManager);
};
« no previous file with comments | « components/autofill/core/browser/autofill_manager.cc ('k') | third_party/libaddressinput/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698