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

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

Issue 2660473002: Ensure field type is Payment before showing Payment Not Secure Warning (Closed)
Patch Set: Add unit test to detect regressions 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 620 matching lines...) Expand 10 before | Expand all | Expand 10 after
631 // (current metric) and number shown to the user. 631 // (current metric) and number shown to the user.
632 if (!has_logged_address_suggestions_count_ && !section_is_autofilled) { 632 if (!has_logged_address_suggestions_count_ && !section_is_autofilled) {
633 AutofillMetrics::LogAddressSuggestionsCount(suggestions.size()); 633 AutofillMetrics::LogAddressSuggestionsCount(suggestions.size());
634 has_logged_address_suggestions_count_ = true; 634 has_logged_address_suggestions_count_ = true;
635 } 635 }
636 } 636 }
637 } 637 }
638 } 638 }
639 639
640 // Show a "Payment not secure" message. 640 // Show a "Payment not secure" message.
641 if (!is_context_secure && is_http_warning_enabled) { 641 if (!is_context_secure && is_filling_credit_card && is_http_warning_enabled) {
642 #if !defined(OS_ANDROID) 642 #if !defined(OS_ANDROID)
643 if (!suggestions.empty()) { 643 if (!suggestions.empty()) {
644 suggestions.insert(suggestions.begin(), Suggestion()); 644 suggestions.insert(suggestions.begin(), Suggestion());
645 suggestions.front().frontend_id = POPUP_ITEM_ID_SEPARATOR; 645 suggestions.front().frontend_id = POPUP_ITEM_ID_SEPARATOR;
646 } 646 }
647 #endif 647 #endif
648 648
649 suggestions.insert( 649 suggestions.insert(
650 suggestions.begin(), 650 suggestions.begin(),
651 CreateHttpWarningMessageSuggestionItem( 651 CreateHttpWarningMessageSuggestionItem(
(...skipping 1488 matching lines...) Expand 10 before | Expand all | Expand 10 after
2140 if (i > 0) 2140 if (i > 0)
2141 fputs("Next oldest form:\n", file); 2141 fputs("Next oldest form:\n", file);
2142 } 2142 }
2143 fputs("\n", file); 2143 fputs("\n", file);
2144 2144
2145 fclose(file); 2145 fclose(file);
2146 } 2146 }
2147 #endif // ENABLE_FORM_DEBUG_DUMP 2147 #endif // ENABLE_FORM_DEBUG_DUMP
2148 2148
2149 } // namespace autofill 2149 } // 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