| Index: ios/chrome/browser/payments/payment_request.mm
|
| diff --git a/ios/chrome/browser/payments/payment_request.mm b/ios/chrome/browser/payments/payment_request.mm
|
| index 3885edb41feb6fa1fe4d4258cf40d3d8b8d62faf..091c41ceee644a6d9a158084b729eb4d60cda60a 100644
|
| --- a/ios/chrome/browser/payments/payment_request.mm
|
| +++ b/ios/chrome/browser/payments/payment_request.mm
|
| @@ -18,10 +18,13 @@
|
| #include "components/payments/core/address_normalizer_impl.h"
|
| #include "components/payments/core/currency_formatter.h"
|
| #include "components/payments/core/payment_request_data_util.h"
|
| +#include "components/prefs/pref_service.h"
|
| +#include "components/signin/core/browser/signin_manager.h"
|
| #include "ios/chrome/browser/application_context.h"
|
| #include "ios/chrome/browser/autofill/validation_rules_storage_factory.h"
|
| #include "ios/chrome/browser/browser_state/chrome_browser_state.h"
|
| #import "ios/chrome/browser/payments/payment_request_util.h"
|
| +#include "ios/chrome/browser/signin/signin_manager_factory.h"
|
| #include "ios/web/public/payments/payment_request.h"
|
| #include "third_party/libaddressinput/chromium/chrome_metadata_source.h"
|
| #include "third_party/libaddressinput/src/cpp/include/libaddressinput/source.h"
|
| @@ -156,13 +159,16 @@ ukm::UkmRecorder* PaymentRequest::GetUkmRecorder() {
|
| }
|
|
|
| std::string PaymentRequest::GetAuthenticatedEmail() const {
|
| - NOTREACHED() << "Implementation is never used";
|
| - return std::string();
|
| + const SigninManager* signin_manager =
|
| + ios::SigninManagerFactory::GetForBrowserStateIfExists(browser_state_);
|
| + if (signin_manager && signin_manager->IsAuthenticated())
|
| + return signin_manager->GetAuthenticatedAccountInfo().email;
|
| + else
|
| + return std::string();
|
| }
|
|
|
| PrefService* PaymentRequest::GetPrefService() {
|
| - NOTREACHED() << "Implementation is never used";
|
| - return nullptr;
|
| + return browser_state_->GetPrefs();
|
| }
|
|
|
| void PaymentRequest::UpdatePaymentDetails(const web::PaymentDetails& details) {
|
|
|