| OLD | NEW |
| (Empty) |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef COMPONENTS_AUTOFILL_CONTENT_BROWSER_WALLET_ENCRYPTION_ESCROW_CLIENT_OBSE
RVER_H_ | |
| 6 #define COMPONENTS_AUTOFILL_CONTENT_BROWSER_WALLET_ENCRYPTION_ESCROW_CLIENT_OBSE
RVER_H_ | |
| 7 | |
| 8 #include <string> | |
| 9 | |
| 10 namespace autofill { | |
| 11 namespace wallet { | |
| 12 | |
| 13 // EncryptionEscrowClientObserver is to be implemented by any classes making | |
| 14 // calls with EncryptionEscrowClient. The appropriate callback method will be | |
| 15 // called on EncryptionEscrowClientObserver with the response from the Online | |
| 16 // Wallet encryption and escrow backend. | |
| 17 class EncryptionEscrowClientObserver { | |
| 18 public: | |
| 19 // Called when an EncryptOneTimePad request finishes successfully. | |
| 20 // |encrypted_one_time_pad| and |session_material| must be used when getting a | |
| 21 // FullWallet. | |
| 22 virtual void OnDidEncryptOneTimePad(const std::string& encrypted_one_time_pad, | |
| 23 const std::string& session_material) = 0; | |
| 24 | |
| 25 // Called when an EscrowCardVerificationNumber request finishes | |
| 26 // successfully. |escrow_handle| must be used when authenticating an | |
| 27 // instrument. | |
| 28 virtual void OnDidEscrowCardVerificationNumber( | |
| 29 const std::string& escrow_handle) = 0; | |
| 30 | |
| 31 // Called when an EscrowInstrumentInformation request finishes successfully. | |
| 32 // |escrow_handle| must be used when saving a new instrument. | |
| 33 virtual void OnDidEscrowInstrumentInformation( | |
| 34 const std::string& escrow_handle) = 0; | |
| 35 | |
| 36 // Called when a request is made to the encryption escrow server. | |
| 37 virtual void OnDidMakeRequest() = 0; | |
| 38 | |
| 39 // Called when a request fails due to a network error or if the response was | |
| 40 // invalid. | |
| 41 virtual void OnNetworkError() = 0; | |
| 42 | |
| 43 // Called when a request fails due to a malformed response. | |
| 44 virtual void OnMalformedResponse() = 0; | |
| 45 | |
| 46 protected: | |
| 47 virtual ~EncryptionEscrowClientObserver() {} | |
| 48 }; | |
| 49 | |
| 50 } // namespace wallet | |
| 51 } // namespace autofill | |
| 52 | |
| 53 #endif // COMPONENTS_AUTOFILL_CONTENT_BROWSER_WALLET_ENCRYPTION_ESCROW_CLIENT_O
BSERVER_H_ | |
| OLD | NEW |