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

Unified Diff: chrome/browser/ui/autofill/autofill_dialog_common.cc

Issue 58683002: rAc: fix validation logic when autofill completion sets country (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: review nit Created 7 years, 1 month 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_common.cc
diff --git a/chrome/browser/ui/autofill/autofill_dialog_common.cc b/chrome/browser/ui/autofill/autofill_dialog_common.cc
index ecffc7da5f9b21fc1cca038161b6482ac9696be2..4391a6b0d18d94711069617aaa590d3ce8457c76 100644
--- a/chrome/browser/ui/autofill/autofill_dialog_common.cc
+++ b/chrome/browser/ui/autofill/autofill_dialog_common.cc
@@ -4,6 +4,8 @@
#include "chrome/browser/ui/autofill/autofill_dialog_common.h"
+#include "chrome/browser/browser_process.h"
+#include "components/autofill/core/browser/autofill_country.h"
#include "components/autofill/core/browser/autofill_field.h"
#include "components/autofill/core/browser/autofill_type.h"
#include "grit/chromium_strings.h"
@@ -176,5 +178,14 @@ AutofillMetrics::DialogUiEvent DialogSectionToUiSelectionChangedEvent(
return AutofillMetrics::NUM_DIALOG_UI_EVENTS;
}
+string16 GetHardcodedValueForType(ServerFieldType type) {
+ if (AutofillType(type).GetStorableType() == ADDRESS_HOME_COUNTRY) {
+ AutofillCountry country("US", g_browser_process->GetApplicationLocale());
+ return country.name();
+ }
+
+ return string16();
+}
+
} // namespace common
} // namespace autofill

Powered by Google App Engine
This is Rietveld 408576698