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

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

Issue 2674743002: Ensure field type is Payment before showing Payment Not Secure Warning (Closed)
Patch Set: Created 3 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 | « no previous file | components/autofill/core/browser/autofill_manager_unittest.cc » ('j') | 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 623 matching lines...) Expand 10 before | Expand all | Expand 10 after
634 // (current metric) and number shown to the user. 634 // (current metric) and number shown to the user.
635 if (!has_logged_address_suggestions_count_ && !section_is_autofilled) { 635 if (!has_logged_address_suggestions_count_ && !section_is_autofilled) {
636 AutofillMetrics::LogAddressSuggestionsCount(suggestions.size()); 636 AutofillMetrics::LogAddressSuggestionsCount(suggestions.size());
637 has_logged_address_suggestions_count_ = true; 637 has_logged_address_suggestions_count_ = true;
638 } 638 }
639 } 639 }
640 } 640 }
641 } 641 }
642 642
643 // Show a "Payment not secure" message. 643 // Show a "Payment not secure" message.
644 if (!is_context_secure && is_http_warning_enabled) { 644 if (!is_context_secure && is_filling_credit_card && is_http_warning_enabled) {
645 #if !defined(OS_ANDROID) 645 #if !defined(OS_ANDROID)
646 if (!suggestions.empty()) { 646 if (!suggestions.empty()) {
647 suggestions.insert(suggestions.begin(), Suggestion()); 647 suggestions.insert(suggestions.begin(), Suggestion());
648 suggestions.front().frontend_id = POPUP_ITEM_ID_SEPARATOR; 648 suggestions.front().frontend_id = POPUP_ITEM_ID_SEPARATOR;
649 } 649 }
650 #endif 650 #endif
651 651
652 suggestions.insert( 652 suggestions.insert(
653 suggestions.begin(), 653 suggestions.begin(),
654 CreateHttpWarningMessageSuggestionItem( 654 CreateHttpWarningMessageSuggestionItem(
(...skipping 1488 matching lines...) Expand 10 before | Expand all | Expand 10 after
2143 if (i > 0) 2143 if (i > 0)
2144 fputs("Next oldest form:\n", file); 2144 fputs("Next oldest form:\n", file);
2145 } 2145 }
2146 fputs("\n", file); 2146 fputs("\n", file);
2147 2147
2148 fclose(file); 2148 fclose(file);
2149 } 2149 }
2150 #endif // ENABLE_FORM_DEBUG_DUMP 2150 #endif // ENABLE_FORM_DEBUG_DUMP
2151 2151
2152 } // namespace autofill 2152 } // namespace autofill
OLDNEW
« no previous file with comments | « no previous file | components/autofill/core/browser/autofill_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698