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

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

Issue 12815002: requestAutocomplete: Fill |form_structure_| from Online Wallet data (including (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 9 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/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 727aec75df156a4004e7ba407ff92ddeb6c17f6c..d5bb806a128c473e19fa394d32ffa21ba5706f61 100644
--- a/chrome/browser/ui/autofill/data_model_wrapper.cc
+++ b/chrome/browser/ui/autofill/data_model_wrapper.cc
@@ -11,7 +11,7 @@
#include "components/autofill/browser/credit_card.h"
#include "components/autofill/browser/form_group.h"
#include "components/autofill/browser/form_structure.h"
-#include "components/autofill/browser/wallet/wallet_address.h"
+#include "components/autofill/browser/wallet/full_wallet.h"
#include "components/autofill/browser/wallet/wallet_address.h"
#include "components/autofill/browser/wallet/wallet_items.h"
#include "ui/base/resource/resource_bundle.h"
@@ -170,7 +170,7 @@ gfx::Image WalletInstrumentWrapper::GetIcon() {
}
void WalletInstrumentWrapper::FillInputs(DetailInputs* inputs) {
- // TODO(estade): implement.
+ NOTREACHED(); // Use FullWalletWrapper to fill inputs.
}
string16 WalletInstrumentWrapper::GetDisplayText() {
@@ -184,4 +184,33 @@ void WalletInstrumentWrapper::FillFormField(AutofillField* field) {
field->value = GetInfo(field->type());
}
+// FullWalletWrapper
+/*
+FullWalletWrapper::FullWalletWrapper(const wallet::FullWallet* full_wallet)
+ : full_wallet_(full_wallet) {
+ DCHECK(full_wallet_);
+}
+
+FullWalletWrapper::~FullWalletWrapper() {}
+
+string16 FullWalletWrapper::GetInfo(AutofillFieldType type) {
+ return full_wallet_->GetInfo(type, false);
+}
+
+gfx::Image FullWalletWrapper::GetIcon() {
+ // TODO(dbeam): this could be implemented if necessary, I just don't see where
+ // we'd ever need it -- this wrapper is only used to fill values into
+ // |AutofillDialogControllerImlp::form_structure_| at the moment.
+ return gfx::Image();
+}
+
+void FullWalletWrapper::FillInputs(DetailInputs* inputs) {
+ // This class shouldn't be used to fill view inputs.
+ NOTREACHED();
+}
+
+void FullWalletWrapper::FillFormField(AutofillField* field) {
+ field->value = GetInfo(field->type());
+}
+*/
} // namespace autofill

Powered by Google App Engine
This is Rietveld 408576698