Use client_->GetPasswordManager()->IsPasswordFieldDetectedOnPage() to find out if there is password field on the page when protected password entry is triggered.
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/f77d4b0816dfa75bb4e6ebc452ba5f8a7e941c30 commit f77d4b0816dfa75bb4e6ebc452ba5f8a7e941c30 Author: jialiul <jialiul@chromium.org> Date: Thu Jun 08 23:02:16 2017 Fill has_password_field for password reuse ping BUG= 730107 Review-Url: https://codereview.chromium.org/2929533002 Cr-Commit-Position: refs/heads/master@{#478115} [modify] https://crrev.com/f77d4b0816dfa75bb4e6ebc452ba5f8a7e941c30/chrome/browser/password_manager/chrome_password_manager_client.cc [modify] https://crrev.com/f77d4b0816dfa75bb4e6ebc452ba5f8a7e941c30/chrome/browser/password_manager/chrome_password_manager_client.h [modify] https://crrev.com/f77d4b0816dfa75bb4e6ebc452ba5f8a7e941c30/chrome/browser/password_manager/chrome_password_manager_client_unittest.cc [modify] https://crrev.com/f77d4b0816dfa75bb4e6ebc452ba5f8a7e941c30/chrome/browser/safe_browsing/chrome_password_protection_service_unittest.cc [modify] https://crrev.com/f77d4b0816dfa75bb4e6ebc452ba5f8a7e941c30/components/password_manager/core/browser/password_manager_client.h [modify] https://crrev.com/f77d4b0816dfa75bb4e6ebc452ba5f8a7e941c30/components/password_manager/core/browser/password_reuse_detection_manager.cc [modify] https://crrev.com/f77d4b0816dfa75bb4e6ebc452ba5f8a7e941c30/components/password_manager/core/browser/stub_password_manager_client.cc [modify] https://crrev.com/f77d4b0816dfa75bb4e6ebc452ba5f8a7e941c30/components/password_manager/core/browser/stub_password_manager_client.h [modify] https://crrev.com/f77d4b0816dfa75bb4e6ebc452ba5f8a7e941c30/components/safe_browsing/password_protection/password_protection_request.cc [modify] https://crrev.com/f77d4b0816dfa75bb4e6ebc452ba5f8a7e941c30/components/safe_browsing/password_protection/password_protection_request.h [modify] https://crrev.com/f77d4b0816dfa75bb4e6ebc452ba5f8a7e941c30/components/safe_browsing/password_protection/password_protection_service.cc [modify] https://crrev.com/f77d4b0816dfa75bb4e6ebc452ba5f8a7e941c30/components/safe_browsing/password_protection/password_protection_service.h [modify] https://crrev.com/f77d4b0816dfa75bb4e6ebc452ba5f8a7e941c30/components/safe_browsing/password_protection/password_protection_service_unittest.cc
Comment 1 by jialiul@chromium.org
, Jun 6 2017