| 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 6f0db86ef991485b12f7f5100148d77fb77be3e3..6b85038c7ef3f6ec306378270330550825c2d9fc 100644
|
| --- a/chrome/browser/ui/autofill/chrome_autofill_client.cc
|
| +++ b/chrome/browser/ui/autofill/chrome_autofill_client.cc
|
| @@ -30,7 +30,6 @@
|
| #include "chrome/browser/ui/chrome_pages.h"
|
| #include "chrome/browser/ui/tabs/tab_strip_model_observer.h"
|
| #include "chrome/browser/web_data_service_factory.h"
|
| -#include "chrome/common/features.h"
|
| #include "chrome/common/url_constants.h"
|
| #include "components/autofill/content/browser/content_autofill_driver.h"
|
| #include "components/autofill/content/browser/content_autofill_driver_factory.h"
|
| @@ -49,18 +48,12 @@
|
| #include "content/public/browser/ssl_status.h"
|
| #include "ui/gfx/geometry/rect.h"
|
|
|
| -#if BUILDFLAG(ANDROID_JAVA_UI)
|
| -#include "chrome/browser/android/chrome_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/zoom/zoom_controller.h"
|
| -#endif
|
| -
|
| #if defined(OS_ANDROID)
|
| #include "base/android/context_utils.h"
|
| +#include "chrome/browser/android/chrome_application.h"
|
| #include "chrome/browser/android/signin/signin_promo_util_android.h"
|
| #include "chrome/browser/infobars/infobar_service.h"
|
| +#include "chrome/browser/ui/android/autofill/autofill_logger_android.h"
|
| #include "chrome/browser/ui/android/infobars/autofill_credit_card_filling_infobar.h"
|
| #include "components/autofill/core/browser/autofill_credit_card_filling_infobar_delegate_mobile.h"
|
| #include "components/autofill/core/browser/autofill_save_card_infobar_delegate_mobile.h"
|
| @@ -69,6 +62,8 @@
|
| #include "content/public/browser/android/content_view_core.h"
|
| #else // !OS_ANDROID
|
| #include "chrome/browser/ui/browser.h"
|
| +#include "chrome/browser/ui/webui/signin/login_ui_service_factory.h"
|
| +#include "components/zoom/zoom_controller.h"
|
| #endif
|
|
|
| DEFINE_WEB_CONTENTS_USER_DATA_KEY(autofill::ChromeAutofillClient);
|
| @@ -90,7 +85,7 @@ ChromeAutofillClient::ChromeAutofillClient(content::WebContents* web_contents)
|
| ->IsOffTheRecord()) {
|
| DCHECK(web_contents);
|
|
|
| -#if !BUILDFLAG(ANDROID_JAVA_UI)
|
| +#if !defined(OS_ANDROID)
|
| // Since ZoomController is also a WebContentsObserver, we need to be careful
|
| // about disconnecting from it since the relative order of destruction of
|
| // WebContentsObservers is not guaranteed. ZoomController silently clears
|
| @@ -143,7 +138,7 @@ IdentityProvider* ChromeAutofillClient::GetIdentityProvider() {
|
| Profile::FromBrowserContext(web_contents()->GetBrowserContext())
|
| ->GetOriginalProfile();
|
| base::Closure login_callback;
|
| -#if !BUILDFLAG(ANDROID_JAVA_UI)
|
| +#if !defined(OS_ANDROID)
|
| login_callback =
|
| LoginUIServiceFactory::GetShowLoginPopupCallbackForProfile(profile);
|
| #endif
|
| @@ -161,13 +156,13 @@ rappor::RapporServiceImpl* ChromeAutofillClient::GetRapporServiceImpl() {
|
| }
|
|
|
| void ChromeAutofillClient::ShowAutofillSettings() {
|
| -#if BUILDFLAG(ANDROID_JAVA_UI)
|
| +#if defined(OS_ANDROID)
|
| chrome::android::ChromeApplication::ShowAutofillSettings();
|
| #else
|
| Browser* browser = chrome::FindBrowserWithWebContents(web_contents());
|
| if (browser)
|
| chrome::ShowSettingsSubPage(browser, chrome::kAutofillSubPage);
|
| -#endif // #if BUILDFLAG(ANDROID_JAVA_UI)
|
| +#endif // #if defined(OS_ANDROID)
|
| }
|
|
|
| void ChromeAutofillClient::ShowUnmaskPrompt(
|
| @@ -298,7 +293,7 @@ bool ChromeAutofillClient::IsAutocompleteEnabled() {
|
| }
|
|
|
| void ChromeAutofillClient::MainFrameWasResized(bool width_changed) {
|
| -#if BUILDFLAG(ANDROID_JAVA_UI)
|
| +#if defined(OS_ANDROID)
|
| // Ignore virtual keyboard showing and hiding a strip of suggestions.
|
| if (!width_changed)
|
| return;
|
| @@ -332,10 +327,10 @@ void ChromeAutofillClient::PropagateAutofillPredictions(
|
| void ChromeAutofillClient::DidFillOrPreviewField(
|
| const base::string16& autofilled_value,
|
| const base::string16& profile_full_name) {
|
| -#if BUILDFLAG(ANDROID_JAVA_UI)
|
| +#if defined(OS_ANDROID)
|
| AutofillLoggerAndroid::DidFillOrPreviewField(autofilled_value,
|
| profile_full_name);
|
| -#endif // BUILDFLAG(ANDROID_JAVA_UI)
|
| +#endif // defined(OS_ANDROID)
|
| }
|
|
|
| void ChromeAutofillClient::OnFirstUserGestureObserved() {
|
|
|