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

Side by Side Diff: components/autofill/core/browser/autofill_manager.cc

Issue 1649293004: [Merge M49][Autofill] Remove warning for CC autofill on secure pages with mixed passive content (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2623
Patch Set: Created 4 years, 10 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 unified diff | Download patch
« no previous file with comments | « chrome/browser/ui/autofill/chrome_autofill_client.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "components/autofill/core/browser/autofill_manager.h" 5 #include "components/autofill/core/browser/autofill_manager.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <algorithm> 10 #include <algorithm>
(...skipping 409 matching lines...) Expand 10 before | Expand all | Expand 10 after
420 !field.should_autocomplete) { 420 !field.should_autocomplete) {
421 return; 421 return;
422 } 422 }
423 if (is_filling_credit_card) { 423 if (is_filling_credit_card) {
424 suggestions = GetCreditCardSuggestions(field, type); 424 suggestions = GetCreditCardSuggestions(field, type);
425 } else { 425 } else {
426 suggestions = 426 suggestions =
427 GetProfileSuggestions(*form_structure, field, *autofill_field); 427 GetProfileSuggestions(*form_structure, field, *autofill_field);
428 } 428 }
429 if (!suggestions.empty()) { 429 if (!suggestions.empty()) {
430 // Don't provide credit card suggestions for non-secure pages. However, 430 // Don't provide credit card suggestions for non-secure pages, but do
431 // do provide a warning to the user. This will generate warnings on pages 431 // provide them for secure pages with passive mixed content (see impl. of
432 // with mixed content (which includes forms with an http target). 432 // IsContextSecure).
433 if (is_filling_credit_card && 433 if (is_filling_credit_card &&
434 !client_->IsContextSecure(form_structure->source_url())) { 434 !client_->IsContextSecure(form_structure->source_url())) {
435 Suggestion warning_suggestion(l10n_util::GetStringUTF16( 435 Suggestion warning_suggestion(l10n_util::GetStringUTF16(
436 IDS_AUTOFILL_WARNING_INSECURE_CONNECTION)); 436 IDS_AUTOFILL_WARNING_INSECURE_CONNECTION));
437 warning_suggestion.frontend_id = POPUP_ITEM_ID_WARNING_MESSAGE; 437 warning_suggestion.frontend_id = POPUP_ITEM_ID_WARNING_MESSAGE;
438 suggestions.assign(1, warning_suggestion); 438 suggestions.assign(1, warning_suggestion);
439 } else { 439 } else {
440 bool section_is_autofilled = 440 bool section_is_autofilled =
441 SectionIsAutofilled(*form_structure, form, 441 SectionIsAutofilled(*form_structure, form,
442 autofill_field->section()); 442 autofill_field->section());
(...skipping 1267 matching lines...) Expand 10 before | Expand all | Expand 10 after
1710 if (i > 0) 1710 if (i > 0)
1711 fputs("Next oldest form:\n", file); 1711 fputs("Next oldest form:\n", file);
1712 } 1712 }
1713 fputs("\n", file); 1713 fputs("\n", file);
1714 1714
1715 fclose(file); 1715 fclose(file);
1716 } 1716 }
1717 #endif // ENABLE_FORM_DEBUG_DUMP 1717 #endif // ENABLE_FORM_DEBUG_DUMP
1718 1718
1719 } // namespace autofill 1719 } // namespace autofill
OLDNEW
« no previous file with comments | « chrome/browser/ui/autofill/chrome_autofill_client.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698