| OLD | NEW |
| 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 673 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 684 FormStructure::ParseQueryResponse(response_xml, form_structures_.get()); | 684 FormStructure::ParseQueryResponse(response_xml, form_structures_.get()); |
| 685 | 685 |
| 686 // Forward form structures to the password generation manager to detect | 686 // Forward form structures to the password generation manager to detect |
| 687 // account creation forms. | 687 // account creation forms. |
| 688 driver_->DetectAccountCreationForms(form_structures_.get()); | 688 driver_->DetectAccountCreationForms(form_structures_.get()); |
| 689 | 689 |
| 690 // If the corresponding flag is set, annotate forms with the predicted types. | 690 // If the corresponding flag is set, annotate forms with the predicted types. |
| 691 driver_->SendAutofillTypePredictionsToRenderer(form_structures_.get()); | 691 driver_->SendAutofillTypePredictionsToRenderer(form_structures_.get()); |
| 692 } | 692 } |
| 693 | 693 |
| 694 void AutofillManager::OnUnmaskResponse(const base::string16& cvc, | 694 void AutofillManager::OnUnmaskResponse(const UnmaskResponse& response) { |
| 695 const base::string16& exp_month, | 695 unmasking_cvc_ = response.cvc; |
| 696 const base::string16& exp_year) { | |
| 697 unmasking_cvc_ = cvc; | |
| 698 // TODO(estade): use month/year. | 696 // TODO(estade): use month/year. |
| 699 real_pan_client_.UnmaskCard(unmasking_card_, base::UTF16ToASCII(cvc)); | 697 real_pan_client_.UnmaskCard(unmasking_card_, base::UTF16ToASCII(response.cvc), |
| 698 response.risk_data); |
| 700 } | 699 } |
| 701 | 700 |
| 702 void AutofillManager::OnUnmaskPromptClosed() { | 701 void AutofillManager::OnUnmaskPromptClosed() { |
| 703 real_pan_client_.CancelRequest(); | 702 real_pan_client_.CancelRequest(); |
| 704 driver_->RendererShouldClearPreviewedForm(); | 703 driver_->RendererShouldClearPreviewedForm(); |
| 705 unmasking_card_ = CreditCard(); | 704 unmasking_card_ = CreditCard(); |
| 706 unmasking_cvc_.clear(); | 705 unmasking_cvc_.clear(); |
| 707 } | 706 } |
| 708 | 707 |
| 709 IdentityProvider* AutofillManager::GetIdentityProvider() { | 708 IdentityProvider* AutofillManager::GetIdentityProvider() { |
| (...skipping 620 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1330 return false; | 1329 return false; |
| 1331 | 1330 |
| 1332 // Disregard forms that we wouldn't ever autofill in the first place. | 1331 // Disregard forms that we wouldn't ever autofill in the first place. |
| 1333 if (!form.ShouldBeParsed()) | 1332 if (!form.ShouldBeParsed()) |
| 1334 return false; | 1333 return false; |
| 1335 | 1334 |
| 1336 return true; | 1335 return true; |
| 1337 } | 1336 } |
| 1338 | 1337 |
| 1339 } // namespace autofill | 1338 } // namespace autofill |
| OLD | NEW |