Chromium Code Reviews| Index: chrome/browser/ui/autofill/autofill_dialog_models.h |
| diff --git a/chrome/browser/ui/autofill/autofill_dialog_models.h b/chrome/browser/ui/autofill/autofill_dialog_models.h |
| index 705a0d30f750a90eb61c0e2b20349ce89faf8de9..1b7942cbfd1b97494338a9c79aa606a928ce59c3 100644 |
| --- a/chrome/browser/ui/autofill/autofill_dialog_models.h |
| +++ b/chrome/browser/ui/autofill/autofill_dialog_models.h |
| @@ -72,7 +72,12 @@ class SuggestionsMenuModel : public ui::SimpleMenuModel, |
| void SetCheckedItem(const std::string& item_key); |
| void SetCheckedIndex(size_t index); |
| - int checked_item() { return checked_item_; } |
| + // Sets the item to be checked to the |n|th item that has key |item_key|. |
| + // If there are fewer than |n| items that share |item_key|, the last one |
| + // becomes checked. |
|
Ilya Sherman
2013/05/21 03:54:35
nit: Please mention that this is 1-indexed rather
Evan Stade
2013/05/21 17:34:41
done. I made it 1-indexed because Nth implies 1-in
|
| + void SetCheckedItemNthWithKey(const std::string& item_key, size_t n); |
|
Ilya Sherman
2013/05/21 03:54:35
What happens if there are no items that share |ite
Evan Stade
2013/05/21 17:34:41
Done.
|
| + |
| + int checked_item() const { return checked_item_; } |
| // ui::SimpleMenuModel::Delegate implementation. |
| virtual bool IsCommandIdChecked(int command_id) const OVERRIDE; |