Chromium Code Reviews| 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 3134eaa88bdf26e94b46762033e30f1f45eac4c4..9656fd47f1e3b58ae735fe8bbc89bef8de5a3d2e 100644 |
| --- a/chrome/browser/ui/autofill/chrome_autofill_client.cc |
| +++ b/chrome/browser/ui/autofill/chrome_autofill_client.cc |
| @@ -32,11 +32,13 @@ |
| #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" |
| +#include "components/autofill/core/browser/popup_item_ids.h" |
| #include "components/autofill/core/browser/ui/card_unmask_prompt_view.h" |
| #include "components/autofill/core/common/autofill_pref_names.h" |
| #include "components/autofill/core/common/autofill_switches.h" |
| #include "components/browser_sync/profile_sync_service.h" |
| #include "components/password_manager/content/browser/content_password_manager_driver.h" |
| +#include "components/password_manager/core/browser/password_manager_metrics_util.h" |
| #include "components/prefs/pref_service.h" |
| #include "components/signin/core/browser/profile_identity_provider.h" |
| #include "components/signin/core/browser/signin_header_helper.h" |
| @@ -372,7 +374,20 @@ bool ChromeAutofillClient::ShouldShowSigninPromo() { |
| #endif |
| } |
| -void ChromeAutofillClient::StartSigninFlow() { |
| +bool ChromeAutofillClient::ExecuteCommand(int id) { |
| + if (id == autofill::POPUP_ITEM_ID_HTTP_NOT_SECURE_WARNING_MESSAGE) { |
| + password_manager::metrics_util::LogShowedHttpNotSecureExplanation(); |
|
vasilii
2017/07/26 12:17:36
You double record this in autofill_external_delega
melandory
2017/07/26 15:01:30
Done.
|
| + ShowHttpNotSecureExplanation(); |
| + return true; |
| + } else if (id == autofill::POPUP_ITEM_ID_ALL_SAVED_PASSWORDS_ENTRY) { |
|
vasilii
2017/07/26 12:17:36
no need for "else"
melandory
2017/07/26 15:01:30
Done.
|
| +#if !defined(OS_ANDROID) |
| + chrome::ShowSettingsSubPage( |
| + chrome::FindBrowserWithWebContents(web_contents()), |
| + chrome::kPasswordManagerSubPage); |
| +#endif |
| + |
| + return true; |
| + } else if (id == autofill::POPUP_ITEM_ID_CREDIT_CARD_SIGNIN_PROMO) { |
| #if defined(OS_ANDROID) |
| auto* window = web_contents()->GetNativeView()->GetWindowAndroid(); |
|
vasilii
2017/07/26 12:17:36
align
melandory
2017/07/26 15:01:30
Done.
|
| if (window) { |
| @@ -380,6 +395,9 @@ void ChromeAutofillClient::StartSigninFlow() { |
| window, signin_metrics::AccessPoint::ACCESS_POINT_AUTOFILL_DROPDOWN); |
| } |
| #endif |
| + return true; |
| + } |
| + return false; |
| } |
| void ChromeAutofillClient::ShowHttpNotSecureExplanation() { |