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

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

Issue 15892013: Make suggestions invalid when no phone number is attached to an address. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 7 years, 7 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 a0fafe856e7e79d77414066c81b4f2146a775a01..cbed13358819d57e1821bd6bd815e9997a4f40c0 100644
--- a/chrome/browser/ui/autofill/data_model_wrapper.cc
+++ b/chrome/browser/ui/autofill/data_model_wrapper.cc
@@ -163,8 +163,10 @@ string16 WalletAddressWrapper::GetInfo(AutofillFieldType type) {
}
string16 WalletAddressWrapper::GetDisplayText() {
- if (!address_->is_complete_address())
+ if (!address_->is_complete_address() ||
+ GetInfo(PHONE_HOME_WHOLE_NUMBER).empty()) {
return string16();
+ }
return DataModelWrapper::GetDisplayText();
}
@@ -191,7 +193,8 @@ gfx::Image WalletInstrumentWrapper::GetIcon() {
string16 WalletInstrumentWrapper::GetDisplayText() {
// TODO(dbeam): handle other instrument statuses? http://crbug.com/233048
if (instrument_->status() == wallet::WalletItems::MaskedInstrument::EXPIRED ||
- !instrument_->address().is_complete_address()) {
+ !instrument_->address().is_complete_address() ||
+ GetInfo(PHONE_HOME_WHOLE_NUMBER).empty()) {
return string16();
}
« no previous file with comments | « chrome/browser/ui/autofill/data_model_wrapper.h ('k') | chrome/browser/ui/autofill/data_model_wrapper_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698