| Index: chrome/browser/ui/autofill/chrome_autofill_client.cc
|
| diff --git a/chrome/browser/ui/autofill/chrome_autofill_client.cc b/chrome/browser/ui/autofill/chrome_autofill_client.cc
|
| index 47b821982e33ad2042643c681b2a88a895fa6a4f..dbc94d9b731b8fe9253d2dc84632219082f4f709 100644
|
| --- a/chrome/browser/ui/autofill/chrome_autofill_client.cc
|
| +++ b/chrome/browser/ui/autofill/chrome_autofill_client.cc
|
| @@ -10,6 +10,9 @@
|
| #include "chrome/browser/infobars/infobar_service.h"
|
| #include "chrome/browser/password_manager/chrome_password_manager_client.h"
|
| #include "chrome/browser/profiles/profile.h"
|
| +#include "chrome/browser/signin/profile_identity_provider.h"
|
| +#include "chrome/browser/signin/profile_oauth2_token_service_factory.h"
|
| +#include "chrome/browser/signin/signin_manager_factory.h"
|
| #include "chrome/browser/ui/autofill/autofill_dialog_controller.h"
|
| #include "chrome/browser/ui/autofill/autofill_popup_controller_impl.h"
|
| #include "chrome/browser/ui/autofill/card_unmask_prompt_view.h"
|
| @@ -33,6 +36,7 @@
|
| #include "chrome/browser/android/chromium_application.h"
|
| #include "chrome/browser/ui/android/autofill/autofill_logger_android.h"
|
| #else
|
| +#include "chrome/browser/ui/webui/signin/login_ui_service_factory.h"
|
| #include "components/ui/zoom/zoom_controller.h"
|
| #endif
|
|
|
| @@ -99,6 +103,23 @@ PrefService* ChromeAutofillClient::GetPrefs() {
|
| ->GetPrefs();
|
| }
|
|
|
| +IdentityProvider* ChromeAutofillClient::GetIdentityProvider() {
|
| + if (!identity_provider_) {
|
| + Profile* profile =
|
| + Profile::FromBrowserContext(web_contents()->GetBrowserContext());
|
| + LoginUIService* login_service = nullptr;
|
| +#if !defined(OS_ANDROID)
|
| + login_service = LoginUIServiceFactory::GetForProfile(profile);
|
| +#endif
|
| + identity_provider_.reset(new ProfileIdentityProvider(
|
| + SigninManagerFactory::GetForProfile(profile),
|
| + ProfileOAuth2TokenServiceFactory::GetForProfile(profile),
|
| + login_service));
|
| + }
|
| +
|
| + return identity_provider_.get();
|
| +}
|
| +
|
| void ChromeAutofillClient::ShowAutofillSettings() {
|
| #if defined(OS_ANDROID)
|
| chrome::android::ChromiumApplication::ShowAutofillSettings();
|
|
|