| 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" | |
| 10 #include "components/autofill/content/browser/wallet/wallet_client.h" | 9 #include "components/autofill/content/browser/wallet/wallet_client.h" |
| 11 #include "components/autofill/content/browser/wallet/wallet_client_delegate.h" | 10 #include "components/autofill/content/browser/wallet/wallet_client_delegate.h" |
| 12 #include "components/autofill/core/browser/autofill_metrics.h" | 11 #include "components/autofill/core/browser/autofill_metrics.h" |
| 13 #include "components/autofill/core/common/autocheckout_status.h" | 12 #include "components/autofill/core/common/autocheckout_status.h" |
| 14 #include "url/gurl.h" | 13 #include "url/gurl.h" |
| 15 | 14 |
| 16 namespace content { | 15 namespace content { |
| 17 class BrowserContext; | 16 class BrowserContext; |
| 18 } | 17 } |
| 19 | 18 |
| (...skipping 20 matching lines...) Expand all Loading... |
| 40 // Retrieves the AutocheckoutRequestManager for |browser_context| if one | 39 // Retrieves the AutocheckoutRequestManager for |browser_context| if one |
| 41 // exists. | 40 // exists. |
| 42 static AutocheckoutRequestManager* FromBrowserContext( | 41 static AutocheckoutRequestManager* FromBrowserContext( |
| 43 content::BrowserContext* browser_context); | 42 content::BrowserContext* browser_context); |
| 44 | 43 |
| 45 // Sends the |status| of an Autocheckout flow to Online Wallet using | 44 // Sends the |status| of an Autocheckout flow to Online Wallet using |
| 46 // |wallet_client_|. | 45 // |wallet_client_|. |
| 47 void SendAutocheckoutStatus( | 46 void SendAutocheckoutStatus( |
| 48 AutocheckoutStatus status, | 47 AutocheckoutStatus status, |
| 49 const GURL& source_url, | 48 const GURL& source_url, |
| 50 const std::vector<AutocheckoutStatistic>& latency_statistics, | |
| 51 const std::string& google_transaction_id); | 49 const std::string& google_transaction_id); |
| 52 | 50 |
| 53 // wallet::WalletClientDelegate: | 51 // wallet::WalletClientDelegate: |
| 54 virtual const AutofillMetrics& GetMetricLogger() const OVERRIDE; | 52 virtual const AutofillMetrics& GetMetricLogger() const OVERRIDE; |
| 55 virtual DialogType GetDialogType() const OVERRIDE; | 53 virtual DialogType GetDialogType() const OVERRIDE; |
| 56 virtual std::string GetRiskData() const OVERRIDE; | 54 virtual std::string GetRiskData() const OVERRIDE; |
| 57 virtual std::string GetWalletCookieValue() const OVERRIDE; | 55 virtual std::string GetWalletCookieValue() const OVERRIDE; |
| 58 virtual void OnDidAcceptLegalDocuments() OVERRIDE; | 56 virtual void OnDidAcceptLegalDocuments() OVERRIDE; |
| 59 virtual void OnDidAuthenticateInstrument(bool success) OVERRIDE; | 57 virtual void OnDidAuthenticateInstrument(bool success) OVERRIDE; |
| 60 virtual void OnDidGetFullWallet( | 58 virtual void OnDidGetFullWallet( |
| (...skipping 19 matching lines...) Expand all Loading... |
| 80 // Makes requests to Online Wallet. The only request this class is configured | 78 // Makes requests to Online Wallet. The only request this class is configured |
| 81 // to make is SendAutocheckoutStatus. | 79 // to make is SendAutocheckoutStatus. |
| 82 wallet::WalletClient wallet_client_; | 80 wallet::WalletClient wallet_client_; |
| 83 | 81 |
| 84 DISALLOW_COPY_AND_ASSIGN(AutocheckoutRequestManager); | 82 DISALLOW_COPY_AND_ASSIGN(AutocheckoutRequestManager); |
| 85 }; | 83 }; |
| 86 | 84 |
| 87 } // namespace autofill | 85 } // namespace autofill |
| 88 | 86 |
| 89 #endif // COMPONENTS_AUTOFILL_CONTENT_BROWSER_AUTOCHECKOUT_REQUEST_MANAGER_H_ | 87 #endif // COMPONENTS_AUTOFILL_CONTENT_BROWSER_AUTOCHECKOUT_REQUEST_MANAGER_H_ |
| OLD | NEW |