summaryrefslogtreecommitdiff
path: root/chromium/components/autofill/core/browser/suggestion_selection.cc
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/components/autofill/core/browser/suggestion_selection.cc')
-rw-r--r--chromium/components/autofill/core/browser/suggestion_selection.cc8
1 files changed, 6 insertions, 2 deletions
diff --git a/chromium/components/autofill/core/browser/suggestion_selection.cc b/chromium/components/autofill/core/browser/suggestion_selection.cc
index 354c174d5b0..0a8d6c04a10 100644
--- a/chromium/components/autofill/core/browser/suggestion_selection.cc
+++ b/chromium/components/autofill/core/browser/suggestion_selection.cc
@@ -69,6 +69,10 @@ std::vector<Suggestion> GetPrefixMatchedSuggestions(
matched_profiles->size() < kMaxSuggestedProfilesCount;
i++) {
AutofillProfile* profile = profiles[i];
+
+ if (profile->ShouldSkipFillingOrSuggesting(type.GetStorableType()))
+ continue;
+
base::string16 value =
GetInfoInOneLine(profile, type, comparator.app_locale());
if (value.empty())
@@ -100,7 +104,7 @@ std::vector<Suggestion> GetPrefixMatchedSuggestions(
}
std::vector<Suggestion> GetUniqueSuggestions(
- const std::vector<ServerFieldType>& other_field_types,
+ const std::vector<ServerFieldType>& field_types,
const std::string app_locale,
const std::vector<AutofillProfile*> matched_profiles,
const std::vector<Suggestion>& suggestions,
@@ -109,7 +113,7 @@ std::vector<Suggestion> GetUniqueSuggestions(
// Limit number of unique profiles as having too many makes the browser hang
// due to drawing calculations (and is also not very useful for the user).
- ServerFieldTypeSet types(other_field_types.begin(), other_field_types.end());
+ ServerFieldTypeSet types(field_types.begin(), field_types.end());
for (size_t i = 0; i < matched_profiles.size() &&
unique_suggestions.size() < kMaxUniqueSuggestionsCount;
++i) {