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

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: fix bad merge resolution 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 6a4d30176277d647a5a30f18c474f4d73e2f14d2..7bd50539814419cbacab11de42f492d5b2f04a9b 100644
--- a/chrome/browser/ui/autofill/autofill_dialog_models.h
+++ b/chrome/browser/ui/autofill/autofill_dialog_models.h
@@ -72,11 +72,17 @@ class SuggestionsMenuModel : public ui::SimpleMenuModel,
void SetCheckedItem(const std::string& item_key);
void SetCheckedIndex(size_t index);
+ // 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 |item_key|, nothing happens.
+ // |n| is 1-indexed.
+ void SetCheckedItemNthWithKey(const std::string& item_key, size_t n);
+
+ int checked_item() const { return checked_item_; }
+
// Enable/disable an item by key.
void SetEnabled(const std::string& item_key, bool enabled);
- int checked_item() { return checked_item_; }
-
// ui::SimpleMenuModel::Delegate implementation.
virtual bool IsCommandIdChecked(int command_id) const OVERRIDE;
virtual bool IsCommandIdEnabled(int command_id) const OVERRIDE;

Powered by Google App Engine
This is Rietveld 408576698