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

Unified Diff: chrome/browser/ui/autofill/autofill_dialog_models.h

Issue 15500008: Persist the choice of AutofillDataModel when using the requestAutocomplete dialog. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: ilya review 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/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..cecf60068d535ec2cd936ff794eb77a780f79312 100644
--- a/chrome/browser/ui/autofill/autofill_dialog_models.h
+++ b/chrome/browser/ui/autofill/autofill_dialog_models.h
@@ -72,7 +72,13 @@ 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. If there is no item with the key one, nothing happens.
Ilya Sherman 2013/05/21 23:20:43 nit: "with the key one" -> "with the key |item_key
Evan Stade 2013/05/22 22:24:02 Done.
+ // |n| is 1-indexed.
+ void SetCheckedItemNthWithKey(const std::string& item_key, size_t n);
+
+ int checked_item() const { return checked_item_; }
// ui::SimpleMenuModel::Delegate implementation.
virtual bool IsCommandIdChecked(int command_id) const OVERRIDE;

Powered by Google App Engine
This is Rietveld 408576698