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