| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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_PAYMENTS_PAYMENTS_CLIENT_H_ | 5 #ifndef COMPONENTS_AUTOFILL_CORE_BROWSER_PAYMENTS_PAYMENTS_CLIENT_H_ |
| 6 #define COMPONENTS_AUTOFILL_CORE_BROWSER_PAYMENTS_PAYMENTS_CLIENT_H_ | 6 #define COMPONENTS_AUTOFILL_CORE_BROWSER_PAYMENTS_PAYMENTS_CLIENT_H_ |
| 7 | 7 |
| 8 #include "base/macros.h" | 8 #include "base/macros.h" |
| 9 #include "base/memory/ref_counted.h" | 9 #include "base/memory/ref_counted.h" |
| 10 #include "base/memory/weak_ptr.h" | 10 #include "base/memory/weak_ptr.h" |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 47 std::unique_ptr<base::DictionaryValue> legal_message) = 0; | 47 std::unique_ptr<base::DictionaryValue> legal_message) = 0; |
| 48 | 48 |
| 49 // Returns the result of an upload request. | 49 // Returns the result of an upload request. |
| 50 virtual void OnDidUploadCard(AutofillClient::PaymentsRpcResult result) = 0; | 50 virtual void OnDidUploadCard(AutofillClient::PaymentsRpcResult result) = 0; |
| 51 }; | 51 }; |
| 52 | 52 |
| 53 // PaymentsClient issues Payments RPCs and manages responses and failure | 53 // PaymentsClient issues Payments RPCs and manages responses and failure |
| 54 // conditions. Only one request may be active at a time. Initiating a new | 54 // conditions. Only one request may be active at a time. Initiating a new |
| 55 // request will cancel a pending request. | 55 // request will cancel a pending request. |
| 56 // Tests are located in | 56 // Tests are located in |
| 57 // src/components/autofill/content/browser/wallet/payments_client_unittest.cc. | 57 // src/components/autofill/content/browser/payments/payments_client_unittest.cc. |
| 58 class PaymentsClient : public net::URLFetcherDelegate, | 58 class PaymentsClient : public net::URLFetcherDelegate, |
| 59 public OAuth2TokenService::Consumer { | 59 public OAuth2TokenService::Consumer { |
| 60 public: | 60 public: |
| 61 // A collection of the information required to make a credit card unmask | 61 // A collection of the information required to make a credit card unmask |
| 62 // request. | 62 // request. |
| 63 struct UnmaskRequestDetails { | 63 struct UnmaskRequestDetails { |
| 64 UnmaskRequestDetails(); | 64 UnmaskRequestDetails(); |
| 65 ~UnmaskRequestDetails(); | 65 ~UnmaskRequestDetails(); |
| 66 | 66 |
| 67 CreditCard card; | 67 CreditCard card; |
| (...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 166 | 166 |
| 167 base::WeakPtrFactory<PaymentsClient> weak_ptr_factory_; | 167 base::WeakPtrFactory<PaymentsClient> weak_ptr_factory_; |
| 168 | 168 |
| 169 DISALLOW_COPY_AND_ASSIGN(PaymentsClient); | 169 DISALLOW_COPY_AND_ASSIGN(PaymentsClient); |
| 170 }; | 170 }; |
| 171 | 171 |
| 172 } // namespace payments | 172 } // namespace payments |
| 173 } // namespace autofill | 173 } // namespace autofill |
| 174 | 174 |
| 175 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_PAYMENTS_PAYMENTS_CLIENT_H_ | 175 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_PAYMENTS_PAYMENTS_CLIENT_H_ |
| OLD | NEW |