| Index: chrome/browser/ui/autofill/autofill_dialog_models.cc
|
| diff --git a/chrome/browser/ui/autofill/autofill_dialog_models.cc b/chrome/browser/ui/autofill/autofill_dialog_models.cc
|
| index ed50352ece95f161686a3c5cc87c2a1a9014a8a6..4cc03c86fa3f49f64e84e4ae563a59b7f90ac0ee 100644
|
| --- a/chrome/browser/ui/autofill/autofill_dialog_models.cc
|
| +++ b/chrome/browser/ui/autofill/autofill_dialog_models.cc
|
| @@ -75,6 +75,15 @@ std::string SuggestionsMenuModel::GetItemKeyForCheckedItem() const {
|
| return items_[checked_item_].first;
|
| }
|
|
|
| +void SuggestionsMenuModel::SetCheckedItem(const std::string& item_key) {
|
| + for (size_t i = 0; i < items_.size(); ++i) {
|
| + if (items_[i].first == item_key) {
|
| + checked_item_ = i;
|
| + break;
|
| + }
|
| + }
|
| +}
|
| +
|
| bool SuggestionsMenuModel::IsCommandIdChecked(
|
| int command_id) const {
|
| return checked_item_ == command_id;
|
| @@ -92,8 +101,7 @@ bool SuggestionsMenuModel::GetAcceleratorForCommandId(
|
| }
|
|
|
| void SuggestionsMenuModel::ExecuteCommand(int command_id, int event_flags) {
|
| - checked_item_ = command_id;
|
| - delegate_->SuggestionItemSelected(*this);
|
| + delegate_->SuggestionItemSelected(this, GetItemKeyAt(command_id));
|
| }
|
|
|
| // AccountChooserModel ---------------------------------------------------------
|
|
|