summaryrefslogtreecommitdiffstats
path: root/components/autofill/browser/wallet/wallet_items.cc
diff options
context:
space:
mode:
authorbenquan@chromium.org <benquan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-05-25 04:05:57 +0000
committerbenquan@chromium.org <benquan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-05-25 04:05:57 +0000
commitdf9751cd442bd8cf2ff0788fffd78feb9ff783bb (patch)
treeec135ce705dc858e0cbda777cc5557494134961c /components/autofill/browser/wallet/wallet_items.cc
parent9c757f30431feed7a1d5315a9509bf25e6c6c7ca (diff)
downloadchromium_src-df9751cd442bd8cf2ff0788fffd78feb9ff783bb.zip
chromium_src-df9751cd442bd8cf2ff0788fffd78feb9ff783bb.tar.gz
chromium_src-df9751cd442bd8cf2ff0788fffd78feb9ff783bb.tar.bz2
Autofill dialog: don't save duplicate shipping addresses to Wallet.
When autofill_dialog in wallet mode, and user select "same-as-billing", avoid to save a duplicated shipping address when user already has an exact matched one in his/her wallet. This applies to both rAC and Autocheckout. BUG=225442 Review URL: https://chromiumcodereview.appspot.com/14765013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@202266 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'components/autofill/browser/wallet/wallet_items.cc')
-rw-r--r--components/autofill/browser/wallet/wallet_items.cc14
1 files changed, 7 insertions, 7 deletions
diff --git a/components/autofill/browser/wallet/wallet_items.cc b/components/autofill/browser/wallet/wallet_items.cc
index ff81bcc..062496f 100644
--- a/components/autofill/browser/wallet/wallet_items.cc
+++ b/components/autofill/browser/wallet/wallet_items.cc
@@ -222,13 +222,6 @@ bool WalletItems::MaskedInstrument::operator!=(
return !(*this == other);
}
-bool WalletItems::HasRequiredAction(RequiredAction action) const {
- DCHECK(ActionAppliesToWalletItems(action));
- return std::find(required_actions_.begin(),
- required_actions_.end(),
- action) != required_actions_.end();
-}
-
const WalletItems::MaskedInstrument* WalletItems::GetInstrumentById(
const std::string& object_id) const {
if (object_id.empty())
@@ -242,6 +235,13 @@ const WalletItems::MaskedInstrument* WalletItems::GetInstrumentById(
return NULL;
}
+bool WalletItems::HasRequiredAction(RequiredAction action) const {
+ DCHECK(ActionAppliesToWalletItems(action));
+ return std::find(required_actions_.begin(),
+ required_actions_.end(),
+ action) != required_actions_.end();
+}
+
base::string16 WalletItems::MaskedInstrument::DisplayName() const {
#if defined(OS_ANDROID)
// TODO(aruslan): improve this stub implementation.