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

Unified Diff: components/autofill/core/browser/autofill_manager.cc

Issue 1059393002: Remove --respect-autocomplete-off-autofill flag. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix last 3 tests Created 5 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: components/autofill/core/browser/autofill_manager.cc
diff --git a/components/autofill/core/browser/autofill_manager.cc b/components/autofill/core/browser/autofill_manager.cc
index 8e0a75dffb9369eec478ea3ad1227af3aeee755c..b8ca3b1463094f5f3889d2b000a6208b393b865e 100644
--- a/components/autofill/core/browser/autofill_manager.cc
+++ b/components/autofill/core/browser/autofill_manager.cc
@@ -458,18 +458,13 @@ void AutofillManager::OnTextFieldDidChange(const FormData& form,
void AutofillManager::OnQueryFormFieldAutofill(int query_id,
const FormData& form,
const FormFieldData& field,
- const gfx::RectF& bounding_box,
- bool display_warning) {
+ const gfx::RectF& bounding_box) {
if (!IsValidFormData(form) || !IsValidFormFieldData(field))
return;
std::vector<Suggestion> suggestions;
- external_delegate_->OnQuery(query_id,
- form,
- field,
- bounding_box,
- display_warning);
+ external_delegate_->OnQuery(query_id, form, field, bounding_box);
// Need to refresh models before using the form_event_loggers.
bool is_autofill_possible = RefreshDataModels();
@@ -501,15 +496,11 @@ void AutofillManager::OnQueryFormFieldAutofill(int query_id,
GetProfileSuggestions(*form_structure, field, *autofill_field);
}
if (!suggestions.empty()) {
- // Don't provide Autofill suggestions when Autofill is disabled, and don't
- // provide credit card suggestions for non-HTTPS pages. However, provide a
- // warning to the user in these cases.
- int warning = 0;
+ // Don't provide credit card suggestions for non-HTTPS pages. However,
+ // do provide a warning to the user.
if (is_filling_credit_card && !FormIsHTTPS(*form_structure)) {
- warning = IDS_AUTOFILL_WARNING_INSECURE_CONNECTION;
- }
- if (warning) {
- Suggestion warning_suggestion(l10n_util::GetStringUTF16(warning));
+ Suggestion warning_suggestion(l10n_util::GetStringUTF16(
+ IDS_AUTOFILL_WARNING_INSECURE_CONNECTION));
warning_suggestion.frontend_id = POPUP_ITEM_ID_WARNING_MESSAGE;
suggestions.assign(1, warning_suggestion);
} else {
« no previous file with comments | « components/autofill/core/browser/autofill_manager.h ('k') | components/autofill/core/browser/autofill_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698