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

Unified Diff: trunk/src/chrome/browser/ui/autofill/autofill_dialog_models.cc

Issue 13877016: Revert 195316 "Remove "Use billing for shipping" checkbox in fav..." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 7 years, 8 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: trunk/src/chrome/browser/ui/autofill/autofill_dialog_models.cc
===================================================================
--- trunk/src/chrome/browser/ui/autofill/autofill_dialog_models.cc (revision 195318)
+++ trunk/src/chrome/browser/ui/autofill/autofill_dialog_models.cc (working copy)
@@ -75,22 +75,6 @@
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;
- return;
- }
- }
-
- NOTREACHED();
-}
-
-void SuggestionsMenuModel::SetCheckedIndex(size_t index) {
- DCHECK_LE(index, items_.size());
- checked_item_ = index;
-}
-
bool SuggestionsMenuModel::IsCommandIdChecked(
int command_id) const {
return checked_item_ == command_id;
@@ -108,7 +92,8 @@
}
void SuggestionsMenuModel::ExecuteCommand(int command_id, int event_flags) {
- delegate_->SuggestionItemSelected(this, command_id);
+ checked_item_ = command_id;
+ delegate_->SuggestionItemSelected(*this);
}
// MonthComboboxModel ----------------------------------------------------------

Powered by Google App Engine
This is Rietveld 408576698