void AutofillPopupMenuClient::removeSuggestionAtIndex(unsigned listIndex) { if (!canRemoveSuggestionAtIndex(listIndex)) return; ASSERT_WITH_SECURITY_IMPLICATION(listIndex < m_names.size()); m_names.remove(listIndex); m_labels.remove(listIndex); m_icons.remove(listIndex); m_itemIDs.remove(listIndex); }
void AutofillPopupMenuClient::removeSuggestionAtIndex(unsigned listIndex) { if (!canRemoveSuggestionAtIndex(listIndex)) return; int index = convertListIndexToInternalIndex(listIndex); ASSERT(static_cast<unsigned>(index) < m_names.size()); m_names.remove(index); m_labels.remove(index); m_icons.remove(index); m_uniqueIDs.remove(index); // Shift the separator index if necessary. if (m_separatorIndex != -1) m_separatorIndex--; }