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 93c22f4efcdfd8e8b35585eafc0d324c21d71eaf..ed2fa683d765c31283b269ac750c680cf8b05647 100644 |
| --- a/chrome/browser/ui/autofill/chrome_autofill_client.cc |
| +++ b/chrome/browser/ui/autofill/chrome_autofill_client.cc |
| @@ -31,11 +31,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" |
| @@ -405,4 +407,24 @@ void ChromeAutofillClient::ShowHttpNotSecureExplanation() { |
| false /* is_renderer_initiated */)); |
| } |
| +bool ChromeAutofillClient::ExecuteCommand(int id) { |
|
Evan Stade
2017/07/13 16:48:43
nit: please keep function implementations in the s
melandory
2017/07/25 15:08:50
Done.
|
| + if (id == autofill::POPUP_ITEM_ID_HTTP_NOT_SECURE_WARNING_MESSAGE) { |
| + password_manager::metrics_util::LogShowedHttpNotSecureExplanation(); |
| + ShowHttpNotSecureExplanation(); |
|
vasilii
2017/07/13 16:11:51
Should you drop ShowHttpNotSecureExplanation() fro
Evan Stade
2017/07/13 16:48:43
yes please
melandory
2017/07/25 15:08:50
Done.
|
| + return true; |
| + } else if (id == autofill::POPUP_ITEM_ID_ALL_SAVED_PASSWORDS_ENTRY) { |
| + ShowPasswordsSettingsPage(); |
| + return true; |
| + } |
| + return false; |
| +} |
| + |
| +void ChromeAutofillClient::ShowPasswordsSettingsPage() { |
|
Evan Stade
2017/07/13 16:48:43
doesn't seem worth adding this function since it's
melandory
2017/07/25 15:08:50
Done.
|
| +#if !defined(OS_ANDROID) |
| + chrome::ShowSettingsSubPage( |
| + chrome::FindBrowserWithWebContents(web_contents()), |
| + chrome::kPasswordManagerSubPage); |
| +#endif |
| +} |
| + |
| } // namespace autofill |