Commit 3f072c5f authored by Fabio Tirelo's avatar Fabio Tirelo Committed by Commit Bot

Replace DCHECK on PopupType with a return of a default value

This DCHECK is sometimes hit for the password popup on DCHECK
enabled windows canary asan builds, and it shouldn't exist.
Returning a default value instead.

Bug: 874062
Change-Id: Ib5be385fb9108aadd8cba09bf587a61ff097cea5
Reviewed-on: https://chromium-review.googlesource.com/1174896Reviewed-by: default avatarRoger McFarlane <rogerm@chromium.org>
Commit-Queue: Fabio Tirelo <ftirelo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#584066}
parent d8187a71
...@@ -434,14 +434,19 @@ void AutofillExternalDelegate::InsertDataListValues( ...@@ -434,14 +434,19 @@ void AutofillExternalDelegate::InsertDataListValues(
base::string16 AutofillExternalDelegate::GetSettingsSuggestionValue() base::string16 AutofillExternalDelegate::GetSettingsSuggestionValue()
const { const {
if (GetPopupType() == PopupType::kAddresses) switch (GetPopupType()) {
return l10n_util::GetStringUTF16(IDS_AUTOFILL_MANAGE_ADDRESSES); case PopupType::kAddresses:
return l10n_util::GetStringUTF16(IDS_AUTOFILL_MANAGE_ADDRESSES);
if (GetPopupType() == PopupType::kCreditCards) case PopupType::kCreditCards:
return l10n_util::GetStringUTF16(IDS_AUTOFILL_MANAGE_PAYMENT_METHODS); return l10n_util::GetStringUTF16(IDS_AUTOFILL_MANAGE_PAYMENT_METHODS);
DCHECK_EQ(GetPopupType(), PopupType::kPersonalInformation); case PopupType::kPersonalInformation:
return l10n_util::GetStringUTF16(IDS_AUTOFILL_MANAGE); return l10n_util::GetStringUTF16(IDS_AUTOFILL_MANAGE);
default:
return base::string16();
}
} }
} // namespace autofill } // namespace autofill
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment