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

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

Issue 896583003: Add risk data to getrealpan request. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 5 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
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 8
9 #include <limits> 9 #include <limits>
10 #include <map> 10 #include <map>
(...skipping 668 matching lines...) Expand 10 before | Expand all | Expand 10 after
679 FormStructure::ParseQueryResponse(response_xml, form_structures_.get()); 679 FormStructure::ParseQueryResponse(response_xml, form_structures_.get());
680 680
681 // Forward form structures to the password generation manager to detect 681 // Forward form structures to the password generation manager to detect
682 // account creation forms. 682 // account creation forms.
683 driver_->DetectAccountCreationForms(form_structures_.get()); 683 driver_->DetectAccountCreationForms(form_structures_.get());
684 684
685 // If the corresponding flag is set, annotate forms with the predicted types. 685 // If the corresponding flag is set, annotate forms with the predicted types.
686 driver_->SendAutofillTypePredictionsToRenderer(form_structures_.get()); 686 driver_->SendAutofillTypePredictionsToRenderer(form_structures_.get());
687 } 687 }
688 688
689 void AutofillManager::OnUnmaskResponse(const base::string16& cvc, 689 void AutofillManager::OnUnmaskResponse(const UnmaskResponse& response) {
690 const base::string16& exp_month, 690 unmasking_cvc_ = response.cvc;
691 const base::string16& exp_year) {
692 unmasking_cvc_ = cvc;
693 // TODO(estade): use month/year. 691 // TODO(estade): use month/year.
694 real_pan_client_.UnmaskCard(unmasking_card_, base::UTF16ToASCII(cvc)); 692 real_pan_client_.UnmaskCard(unmasking_card_, base::UTF16ToASCII(response.cvc),
693 response.risk_data);
695 } 694 }
696 695
697 void AutofillManager::OnUnmaskPromptClosed() { 696 void AutofillManager::OnUnmaskPromptClosed() {
698 real_pan_client_.CancelRequest(); 697 real_pan_client_.CancelRequest();
699 driver_->RendererShouldClearPreviewedForm(); 698 driver_->RendererShouldClearPreviewedForm();
700 unmasking_card_ = CreditCard(); 699 unmasking_card_ = CreditCard();
701 unmasking_cvc_.clear(); 700 unmasking_cvc_.clear();
702 } 701 }
703 702
704 IdentityProvider* AutofillManager::GetIdentityProvider() { 703 IdentityProvider* AutofillManager::GetIdentityProvider() {
(...skipping 620 matching lines...) Expand 10 before | Expand all | Expand 10 after
1325 return false; 1324 return false;
1326 1325
1327 // Disregard forms that we wouldn't ever autofill in the first place. 1326 // Disregard forms that we wouldn't ever autofill in the first place.
1328 if (!form.ShouldBeParsed()) 1327 if (!form.ShouldBeParsed())
1329 return false; 1328 return false;
1330 1329
1331 return true; 1330 return true;
1332 } 1331 }
1333 1332
1334 } // namespace autofill 1333 } // namespace autofill
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698