| 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 #include "components/autofill/content/browser/autocheckout_request_manager.h" | 5 #include "components/autofill/content/browser/autocheckout_request_manager.h" |
| 6 | 6 |
| 7 #include "components/autofill/core/browser/autofill_manager_delegate.h" | 7 #include "components/autofill/core/browser/autofill_manager_delegate.h" |
| 8 #include "content/public/browser/browser_context.h" | 8 #include "content/public/browser/browser_context.h" |
| 9 | 9 |
| 10 namespace { | 10 namespace { |
| (...skipping 21 matching lines...) Expand all Loading... |
| 32 // static | 32 // static |
| 33 AutocheckoutRequestManager* AutocheckoutRequestManager::FromBrowserContext( | 33 AutocheckoutRequestManager* AutocheckoutRequestManager::FromBrowserContext( |
| 34 content::BrowserContext* browser_context) { | 34 content::BrowserContext* browser_context) { |
| 35 return static_cast<AutocheckoutRequestManager*>( | 35 return static_cast<AutocheckoutRequestManager*>( |
| 36 browser_context->GetUserData(kAutocheckoutRequestManagerKey)); | 36 browser_context->GetUserData(kAutocheckoutRequestManagerKey)); |
| 37 } | 37 } |
| 38 | 38 |
| 39 void AutocheckoutRequestManager::SendAutocheckoutStatus( | 39 void AutocheckoutRequestManager::SendAutocheckoutStatus( |
| 40 AutocheckoutStatus status, | 40 AutocheckoutStatus status, |
| 41 const GURL& source_url, | 41 const GURL& source_url, |
| 42 const std::vector<AutocheckoutStatistic>& latency_statistics, | |
| 43 const std::string& google_transaction_id) { | 42 const std::string& google_transaction_id) { |
| 44 wallet_client_.SendAutocheckoutStatus(status, | 43 wallet_client_.SendAutocheckoutStatus(status, |
| 45 source_url, | 44 source_url, |
| 46 latency_statistics, | |
| 47 google_transaction_id); | 45 google_transaction_id); |
| 48 } | 46 } |
| 49 | 47 |
| 50 | 48 |
| 51 const AutofillMetrics& AutocheckoutRequestManager::GetMetricLogger() const { | 49 const AutofillMetrics& AutocheckoutRequestManager::GetMetricLogger() const { |
| 52 return metric_logger_; | 50 return metric_logger_; |
| 53 } | 51 } |
| 54 | 52 |
| 55 DialogType AutocheckoutRequestManager::GetDialogType() const { | 53 DialogType AutocheckoutRequestManager::GetDialogType() const { |
| 56 return DIALOG_TYPE_AUTOCHECKOUT; | 54 return DIALOG_TYPE_AUTOCHECKOUT; |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 96 wallet::WalletClient::ErrorType error_type) { | 94 wallet::WalletClient::ErrorType error_type) { |
| 97 // Nothing to be done. |error_type| is logged by |metric_logger_|. | 95 // Nothing to be done. |error_type| is logged by |metric_logger_|. |
| 98 } | 96 } |
| 99 | 97 |
| 100 AutocheckoutRequestManager::AutocheckoutRequestManager( | 98 AutocheckoutRequestManager::AutocheckoutRequestManager( |
| 101 net::URLRequestContextGetter* request_context_getter) | 99 net::URLRequestContextGetter* request_context_getter) |
| 102 : wallet_client_(request_context_getter, this) { | 100 : wallet_client_(request_context_getter, this) { |
| 103 } | 101 } |
| 104 | 102 |
| 105 } // namespace autofill | 103 } // namespace autofill |
| OLD | NEW |