| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 #ifndef COMPONENTS_AUTOFILL_CORE_BROWSER_CARD_UNMASK_DELEGATE_H_ | 5 #ifndef COMPONENTS_AUTOFILL_CORE_BROWSER_CARD_UNMASK_DELEGATE_H_ |
| 6 #define COMPONENTS_AUTOFILL_CORE_BROWSER_CARD_UNMASK_DELEGATE_H_ | 6 #define COMPONENTS_AUTOFILL_CORE_BROWSER_CARD_UNMASK_DELEGATE_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/strings/string16.h" | 10 #include "base/strings/string16.h" |
| 11 | 11 |
| 12 namespace autofill { | 12 namespace autofill { |
| 13 | 13 |
| 14 class CardUnmaskDelegate { | 14 class CardUnmaskDelegate { |
| 15 public: | 15 public: |
| 16 struct UnmaskResponse { | 16 struct UnmaskResponse { |
| 17 UnmaskResponse(); | 17 UnmaskResponse(); |
| 18 ~UnmaskResponse(); | 18 ~UnmaskResponse(); |
| 19 | 19 |
| 20 // User input data. | 20 // User input data. |
| 21 base::string16 cvc; | 21 base::string16 cvc; |
| 22 base::string16 exp_month; | 22 base::string16 exp_month; |
| 23 base::string16 exp_year; | 23 base::string16 exp_year; |
| 24 bool should_store_pan; |
| 24 | 25 |
| 25 // Risk fingerprint. | 26 // Risk fingerprint. |
| 26 std::string risk_data; | 27 std::string risk_data; |
| 27 }; | 28 }; |
| 28 | 29 |
| 29 // Called when the user has attempted a verification. Prompt is still | 30 // Called when the user has attempted a verification. Prompt is still |
| 30 // open at this point. | 31 // open at this point. |
| 31 virtual void OnUnmaskResponse(const UnmaskResponse& response) = 0; | 32 virtual void OnUnmaskResponse(const UnmaskResponse& response) = 0; |
| 32 | 33 |
| 33 // Called when the unmask prompt is closed (e.g., cancelled). | 34 // Called when the unmask prompt is closed (e.g., cancelled). |
| 34 virtual void OnUnmaskPromptClosed() = 0; | 35 virtual void OnUnmaskPromptClosed() = 0; |
| 35 }; | 36 }; |
| 36 | 37 |
| 37 } // namespace autofill | 38 } // namespace autofill |
| 38 | 39 |
| 39 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_CARD_UNMASK_DELEGATE_H_ | 40 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_CARD_UNMASK_DELEGATE_H_ |
| OLD | NEW |