| 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 #ifndef COMPONENTS_AUTOFILL_CONTENT_BROWSER_AUTOCHECKOUT_REQUEST_MANAGER_H_ | 5 #ifndef COMPONENTS_AUTOFILL_CONTENT_BROWSER_AUTOCHECKOUT_REQUEST_MANAGER_H_ |
| 6 #define COMPONENTS_AUTOFILL_CONTENT_BROWSER_AUTOCHECKOUT_REQUEST_MANAGER_H_ | 6 #define COMPONENTS_AUTOFILL_CONTENT_BROWSER_AUTOCHECKOUT_REQUEST_MANAGER_H_ |
| 7 | 7 |
| 8 #include "base/supports_user_data.h" | 8 #include "base/supports_user_data.h" |
| 9 #include "components/autofill/content/browser/autocheckout_statistic.h" | 9 #include "components/autofill/content/browser/autocheckout_statistic.h" |
| 10 #include "components/autofill/content/browser/wallet/wallet_client.h" | 10 #include "components/autofill/content/browser/wallet/wallet_client.h" |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 53 // wallet::WalletClientDelegate: | 53 // wallet::WalletClientDelegate: |
| 54 virtual const AutofillMetrics& GetMetricLogger() const OVERRIDE; | 54 virtual const AutofillMetrics& GetMetricLogger() const OVERRIDE; |
| 55 virtual DialogType GetDialogType() const OVERRIDE; | 55 virtual DialogType GetDialogType() const OVERRIDE; |
| 56 virtual std::string GetRiskData() const OVERRIDE; | 56 virtual std::string GetRiskData() const OVERRIDE; |
| 57 virtual void OnDidAcceptLegalDocuments() OVERRIDE; | 57 virtual void OnDidAcceptLegalDocuments() OVERRIDE; |
| 58 virtual void OnDidAuthenticateInstrument(bool success) OVERRIDE; | 58 virtual void OnDidAuthenticateInstrument(bool success) OVERRIDE; |
| 59 virtual void OnDidGetFullWallet( | 59 virtual void OnDidGetFullWallet( |
| 60 scoped_ptr<wallet::FullWallet> full_wallet) OVERRIDE; | 60 scoped_ptr<wallet::FullWallet> full_wallet) OVERRIDE; |
| 61 virtual void OnDidGetWalletItems( | 61 virtual void OnDidGetWalletItems( |
| 62 scoped_ptr<wallet::WalletItems> wallet_items) OVERRIDE; | 62 scoped_ptr<wallet::WalletItems> wallet_items) OVERRIDE; |
| 63 virtual void OnDidSaveAddress( | 63 virtual void OnDidSaveToWallet( |
| 64 const std::string& address_id, | |
| 65 const std::vector<wallet::RequiredAction>& required_actions, | |
| 66 const std::vector<wallet::FormFieldError>& form_field_errors) OVERRIDE; | |
| 67 virtual void OnDidSaveInstrument( | |
| 68 const std::string& instrument_id, | |
| 69 const std::vector<wallet::RequiredAction>& required_actions, | |
| 70 const std::vector<wallet::FormFieldError>& form_field_errors) OVERRIDE; | |
| 71 virtual void OnDidSaveInstrumentAndAddress( | |
| 72 const std::string& instrument_id, | 64 const std::string& instrument_id, |
| 73 const std::string& address_id, | 65 const std::string& address_id, |
| 74 const std::vector<wallet::RequiredAction>& required_actions, | 66 const std::vector<wallet::RequiredAction>& required_actions, |
| 75 const std::vector<wallet::FormFieldError>& form_field_errors) OVERRIDE; | 67 const std::vector<wallet::FormFieldError>& form_field_errors) OVERRIDE; |
| 76 virtual void OnDidUpdateAddress( | |
| 77 const std::string& address_id, | |
| 78 const std::vector<wallet::RequiredAction>& required_actions, | |
| 79 const std::vector<wallet::FormFieldError>& form_field_errors) OVERRIDE; | |
| 80 virtual void OnDidUpdateInstrument( | |
| 81 const std::string& instrument_id, | |
| 82 const std::vector<wallet::RequiredAction>& required_actions, | |
| 83 const std::vector<wallet::FormFieldError>& form_field_errors) OVERRIDE; | |
| 84 virtual void OnWalletError( | 68 virtual void OnWalletError( |
| 85 wallet::WalletClient::ErrorType error_type) OVERRIDE; | 69 wallet::WalletClient::ErrorType error_type) OVERRIDE; |
| 86 | 70 |
| 87 private: | 71 private: |
| 88 // |request_context_getter| is passed in to construct |wallet_client_|. | 72 // |request_context_getter| is passed in to construct |wallet_client_|. |
| 89 AutocheckoutRequestManager( | 73 AutocheckoutRequestManager( |
| 90 net::URLRequestContextGetter* request_context_getter); | 74 net::URLRequestContextGetter* request_context_getter); |
| 91 | 75 |
| 92 // Logs various UMA metrics. | 76 // Logs various UMA metrics. |
| 93 AutofillMetrics metric_logger_; | 77 AutofillMetrics metric_logger_; |
| 94 | 78 |
| 95 // Makes requests to Online Wallet. The only request this class is configured | 79 // Makes requests to Online Wallet. The only request this class is configured |
| 96 // to make is SendAutocheckoutStatus. | 80 // to make is SendAutocheckoutStatus. |
| 97 wallet::WalletClient wallet_client_; | 81 wallet::WalletClient wallet_client_; |
| 98 | 82 |
| 99 DISALLOW_COPY_AND_ASSIGN(AutocheckoutRequestManager); | 83 DISALLOW_COPY_AND_ASSIGN(AutocheckoutRequestManager); |
| 100 }; | 84 }; |
| 101 | 85 |
| 102 } // namespace autofill | 86 } // namespace autofill |
| 103 | 87 |
| 104 #endif // COMPONENTS_AUTOFILL_CONTENT_BROWSER_AUTOCHECKOUT_REQUEST_MANAGER_H_ | 88 #endif // COMPONENTS_AUTOFILL_CONTENT_BROWSER_AUTOCHECKOUT_REQUEST_MANAGER_H_ |
| OLD | NEW |