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

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

Issue 2711543002: Experiment to add bank name in autofill ui. (Closed)
Patch Set: Experiment to add bank name in autofill ui. 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 1980 matching lines...) Expand 10 before | Expand all | Expand 10 after
1991 std::vector<Suggestion> AutofillManager::GetCreditCardSuggestions( 1991 std::vector<Suggestion> AutofillManager::GetCreditCardSuggestions(
1992 const FormFieldData& field, 1992 const FormFieldData& field,
1993 const AutofillType& type) const { 1993 const AutofillType& type) const {
1994 credit_card_form_event_logger_->OnDidPollSuggestions(field); 1994 credit_card_form_event_logger_->OnDidPollSuggestions(field);
1995 1995
1996 // The field value is sanitized before attempting to match it to the user's 1996 // The field value is sanitized before attempting to match it to the user's
1997 // data. 1997 // data.
1998 std::vector<Suggestion> suggestions = 1998 std::vector<Suggestion> suggestions =
1999 personal_data_->GetCreditCardSuggestions( 1999 personal_data_->GetCreditCardSuggestions(
2000 type, SanitizeCreditCardFieldValue(field.value)); 2000 type, SanitizeCreditCardFieldValue(field.value));
2001 const std::vector<CreditCard*> cards_to_suggest =
2002 personal_data_->GetCreditCardsToSuggest();
2003 for (const CreditCard* credit_card : cards_to_suggest) {
2004 if (!credit_card->bank_name().empty()) {
2005 credit_card_form_event_logger_->SetBankNameAvailable();
2006 break;
2007 }
2008 }
2001 for (size_t i = 0; i < suggestions.size(); i++) { 2009 for (size_t i = 0; i < suggestions.size(); i++) {
2002 suggestions[i].frontend_id = 2010 suggestions[i].frontend_id =
2003 MakeFrontendID(suggestions[i].backend_id, std::string()); 2011 MakeFrontendID(suggestions[i].backend_id, std::string());
2004 suggestions[i].is_value_bold = IsCreditCardPopupValueBold(); 2012 suggestions[i].is_value_bold = IsCreditCardPopupValueBold();
2005 } 2013 }
2006 return suggestions; 2014 return suggestions;
2007 } 2015 }
2008 2016
2009 void AutofillManager::ParseForms(const std::vector<FormData>& forms) { 2017 void AutofillManager::ParseForms(const std::vector<FormData>& forms) {
2010 if (forms.empty()) 2018 if (forms.empty())
(...skipping 350 matching lines...) Expand 10 before | Expand all | Expand 10 after
2361 #endif // ENABLE_FORM_DEBUG_DUMP 2369 #endif // ENABLE_FORM_DEBUG_DUMP
2362 2370
2363 void AutofillManager::LogCardUploadDecisions(int upload_decision_metrics) { 2371 void AutofillManager::LogCardUploadDecisions(int upload_decision_metrics) {
2364 AutofillMetrics::LogCardUploadDecisionMetrics(upload_decision_metrics); 2372 AutofillMetrics::LogCardUploadDecisionMetrics(upload_decision_metrics);
2365 AutofillMetrics::LogCardUploadDecisionsUkm(client_->GetUkmRecorder(), 2373 AutofillMetrics::LogCardUploadDecisionsUkm(client_->GetUkmRecorder(),
2366 pending_upload_request_url_, 2374 pending_upload_request_url_,
2367 upload_decision_metrics); 2375 upload_decision_metrics);
2368 } 2376 }
2369 2377
2370 } // namespace autofill 2378 } // namespace autofill
OLDNEW
« no previous file with comments | « components/autofill/core/browser/autofill_experiments.cc ('k') | components/autofill/core/browser/autofill_metrics.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698