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

Unified Diff: chrome/browser/ui/autofill/autofill_dialog_i18n_input.h

Issue 145553009: rAc: use libaddressinput to validate international addresses. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: win compile? 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: chrome/browser/ui/autofill/autofill_dialog_i18n_input.h
diff --git a/chrome/browser/ui/autofill/autofill_dialog_i18n_input.h b/chrome/browser/ui/autofill/autofill_dialog_i18n_input.h
index 92e80ff74734a069ae8d28b427172c8960ff2fa1..c1b4e726c4394d2406fb06ba6751a1de964bf4ab 100644
--- a/chrome/browser/ui/autofill/autofill_dialog_i18n_input.h
+++ b/chrome/browser/ui/autofill/autofill_dialog_i18n_input.h
@@ -5,8 +5,20 @@
#ifndef CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_DIALOG_I18N_INPUT_H_
#define CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_DIALOG_I18N_INPUT_H_
+#include <string>
+
+#include "base/callback.h"
+#include "base/strings/string16.h"
#include "chrome/browser/ui/autofill/autofill_dialog_common.h"
#include "chrome/browser/ui/autofill/autofill_dialog_types.h"
+#include "components/autofill/core/browser/autofill_type.h"
+#include "third_party/libaddressinput/chromium/cpp/include/libaddressinput/address_field.h"
+
+namespace i18n {
+namespace addressinput {
+struct AddressData;
+}
+}
namespace autofill {
@@ -33,6 +45,16 @@ bool CardHasCompleteAndVerifiedData(const CreditCard& card);
// exact set of required fields depends on the region.
bool AddressHasCompleteAndVerifiedData(const AutofillProfile& profile);
+// Returns the corresponding Autofill server type for |field|.
+ServerFieldType TypeForField(::i18n::addressinput::AddressField field,
+ common::AddressType address_type);
+
+// Creates an AddressData object for internationalized address display or
+// validation using |get_info| for field values.
+void CreateAddressData(
+ const base::Callback<base::string16(const AutofillType&)>& get_info,
+ ::i18n::addressinput::AddressData* address_data);
+
} // namespace i18ninput
} // namespace autofill

Powered by Google App Engine
This is Rietveld 408576698