Commit 01e138d5 authored by Hao Zhang's avatar Hao Zhang Committed by Commit Bot

[Exp date fix flow] Replace GetTextForRow with GetItemAt

bug: 899057
Change-Id: Ic675061e34d06766c1869c92f4fc568ac386f2ed
Reviewed-on: https://chromium-review.googlesource.com/c/1340535Reviewed-by: default avatarEvan Stade <estade@chromium.org>
Commit-Queue: Hao Zhang <hozhng@google.com>
Cr-Commit-Position: refs/heads/master@{#609146}
parent 00467683
...@@ -73,10 +73,10 @@ bool SaveCardOfferBubbleViews::Accept() { ...@@ -73,10 +73,10 @@ bool SaveCardOfferBubbleViews::Accept() {
controller()->OnSaveButton( controller()->OnSaveButton(
{cardholder_name_textfield_ ? cardholder_name_textfield_->text() {cardholder_name_textfield_ ? cardholder_name_textfield_->text()
: base::string16(), : base::string16(),
month_input_dropdown_ ? month_input_dropdown_->GetTextForRow( month_input_dropdown_ ? month_input_dropdown_->model()->GetItemAt(
month_input_dropdown_->selected_index()) month_input_dropdown_->selected_index())
: base::string16(), : base::string16(),
year_input_dropdown_ ? year_input_dropdown_->GetTextForRow( year_input_dropdown_ ? year_input_dropdown_->model()->GetItemAt(
year_input_dropdown_->selected_index()) year_input_dropdown_->selected_index())
: base::string16()}); : base::string16()});
} }
...@@ -113,10 +113,10 @@ bool SaveCardOfferBubbleViews::IsDialogButtonEnabled( ...@@ -113,10 +113,10 @@ bool SaveCardOfferBubbleViews::IsDialogButtonEnabled(
// the same time. // the same time.
DCHECK(!cardholder_name_textfield_); DCHECK(!cardholder_name_textfield_);
int month_value = 0, year_value = 0; int month_value = 0, year_value = 0;
if (!base::StringToInt(month_input_dropdown_->GetTextForRow( if (!base::StringToInt(month_input_dropdown_->model()->GetItemAt(
month_input_dropdown_->selected_index()), month_input_dropdown_->selected_index()),
&month_value) || &month_value) ||
!base::StringToInt(year_input_dropdown_->GetTextForRow( !base::StringToInt(year_input_dropdown_->model()->GetItemAt(
year_input_dropdown_->selected_index()), year_input_dropdown_->selected_index()),
&year_value)) { &year_value)) {
return false; return false;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment