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

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

Issue 63053003: Ask libaddressinput for address components to use in requestAutocomplete(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . 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/data_model_wrapper.cc
diff --git a/chrome/browser/ui/autofill/data_model_wrapper.cc b/chrome/browser/ui/autofill/data_model_wrapper.cc
index 2f5844297dbf3976571549ec7397b44625367aad..06b7a14fe8b741274049257895aad493c9337681 100644
--- a/chrome/browser/ui/autofill/data_model_wrapper.cc
+++ b/chrome/browser/ui/autofill/data_model_wrapper.cc
@@ -26,10 +26,12 @@ namespace autofill {
DataModelWrapper::~DataModelWrapper() {}
-void DataModelWrapper::FillInputs(DetailInputs* inputs) {
+void DataModelWrapper::FillInputs(DetailInputs* inputs,
+ const std::string& country_code) {
for (size_t i = 0; i < inputs->size(); ++i) {
DetailInput* input = &(*inputs)[i];
- input->initial_value = common::GetHardcodedValueForType(input->type);
+ input->initial_value = common::GetInitialValueForType(input->type,
+ country_code);
if (input->initial_value.empty())
input->initial_value = GetInfo(AutofillType(input->type));
}
@@ -355,15 +357,15 @@ base::string16 FullWalletShippingWrapper::GetInfo(
type, g_browser_process->GetApplicationLocale());
}
-DetailOutputWrapper::DetailOutputWrapper(const DetailOutputMap& outputs)
- : outputs_(outputs) {}
+SnapshotWrapper::SnapshotWrapper(const UserInputSnapshot& snapshot)
+ : snapshot_(snapshot) {}
-DetailOutputWrapper::~DetailOutputWrapper() {}
+SnapshotWrapper::~SnapshotWrapper() {}
-base::string16 DetailOutputWrapper::GetInfo(const AutofillType& type) const {
- for (DetailOutputMap::const_iterator it = outputs_.begin();
- it != outputs_.end(); ++it) {
- if (type.server_type() == it->first->type)
+base::string16 SnapshotWrapper::GetInfo(const AutofillType& type) const {
+ for (UserInputSnapshot::const_iterator it = snapshot_.begin();
+ it != snapshot_.end(); ++it) {
+ if (type.server_type() == it->first)
return it->second;
}
return base::string16();

Powered by Google App Engine
This is Rietveld 408576698