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

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

Issue 2711543002: Experiment to add bank name in autofill ui. (Closed)
Patch Set: Address comments Created 3 years, 6 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
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 1974 matching lines...) Expand 10 before | Expand all | Expand 10 after
1985 std::vector<Suggestion> AutofillManager::GetCreditCardSuggestions( 1985 std::vector<Suggestion> AutofillManager::GetCreditCardSuggestions(
1986 const FormFieldData& field, 1986 const FormFieldData& field,
1987 const AutofillType& type) const { 1987 const AutofillType& type) const {
1988 credit_card_form_event_logger_->OnDidPollSuggestions(field); 1988 credit_card_form_event_logger_->OnDidPollSuggestions(field);
1989 1989
1990 // The field value is sanitized before attempting to match it to the user's 1990 // The field value is sanitized before attempting to match it to the user's
1991 // data. 1991 // data.
1992 std::vector<Suggestion> suggestions = 1992 std::vector<Suggestion> suggestions =
1993 personal_data_->GetCreditCardSuggestions( 1993 personal_data_->GetCreditCardSuggestions(
1994 type, SanitizeCreditCardFieldValue(field.value)); 1994 type, SanitizeCreditCardFieldValue(field.value));
1995 const std::vector<CreditCard*> cards_to_suggest =
1996 personal_data_->GetCreditCardsToSuggest();
1997 for (const CreditCard* credit_card : cards_to_suggest) {
1998 if (!credit_card->bank_name().empty()) {
1999 credit_card_form_event_logger_->SetBankNameAvailable();
2000 break;
2001 }
2002 }
1995 for (size_t i = 0; i < suggestions.size(); i++) { 2003 for (size_t i = 0; i < suggestions.size(); i++) {
1996 suggestions[i].frontend_id = 2004 suggestions[i].frontend_id =
1997 MakeFrontendID(suggestions[i].backend_id, std::string()); 2005 MakeFrontendID(suggestions[i].backend_id, std::string());
1998 suggestions[i].is_value_bold = IsCreditCardPopupValueBold(); 2006 suggestions[i].is_value_bold = IsCreditCardPopupValueBold();
1999 } 2007 }
2000 return suggestions; 2008 return suggestions;
2001 } 2009 }
2002 2010
2003 void AutofillManager::ParseForms(const std::vector<FormData>& forms) { 2011 void AutofillManager::ParseForms(const std::vector<FormData>& forms) {
2004 if (forms.empty()) 2012 if (forms.empty())
(...skipping 350 matching lines...) Expand 10 before | Expand all | Expand 10 after
2355 #endif // ENABLE_FORM_DEBUG_DUMP 2363 #endif // ENABLE_FORM_DEBUG_DUMP
2356 2364
2357 void AutofillManager::LogCardUploadDecisions(int upload_decision_metrics) { 2365 void AutofillManager::LogCardUploadDecisions(int upload_decision_metrics) {
2358 AutofillMetrics::LogCardUploadDecisionMetrics(upload_decision_metrics); 2366 AutofillMetrics::LogCardUploadDecisionMetrics(upload_decision_metrics);
2359 AutofillMetrics::LogCardUploadDecisionsUkm(client_->GetUkmRecorder(), 2367 AutofillMetrics::LogCardUploadDecisionsUkm(client_->GetUkmRecorder(),
2360 pending_upload_request_url_, 2368 pending_upload_request_url_,
2361 upload_decision_metrics); 2369 upload_decision_metrics);
2362 } 2370 }
2363 2371
2364 } // namespace autofill 2372 } // namespace autofill
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698