Chromium Code Reviews| Index: chrome/browser/password_manager/chrome_password_manager_client.h |
| diff --git a/chrome/browser/password_manager/chrome_password_manager_client.h b/chrome/browser/password_manager/chrome_password_manager_client.h |
| index 691fd949fb3665aac433ad26af60df0a25992047..480cb8199e6837b0de843f16338bec89c02c25db 100644 |
| --- a/chrome/browser/password_manager/chrome_password_manager_client.h |
| +++ b/chrome/browser/password_manager/chrome_password_manager_client.h |
| @@ -135,6 +135,12 @@ class ChromePasswordManagerClient |
| // on this |url|. |
| static bool CanShowBubbleOnURL(const GURL& url); |
| + // Exposed for testing. |
|
vasilii
2017/06/29 11:59:59
Missing #if defined(UNIT_TEST)
engedy
2017/06/30 19:41:54
Done.
|
| + bool was_store_ever_called() const { return was_store_ever_called_; } |
| + bool has_binding_for_credential_manager() const { |
| + return credential_manager_impl_.HasBinding(); |
| + } |
| + |
| protected: |
| // Callable for tests. |
| ChromePasswordManagerClient(content::WebContents* web_contents, |
| @@ -146,11 +152,11 @@ class ChromePasswordManagerClient |
| // content::WebContentsObserver overrides. |
| void DidStartNavigation( |
| content::NavigationHandle* navigation_handle) override; |
| -// TODO(crbug.com/706392): Fix password reuse detection for Android. |
| -#if !defined(OS_ANDROID) |
| void DidFinishNavigation( |
| content::NavigationHandle* navigation_handle) override; |
| +// TODO(crbug.com/706392): Fix password reuse detection for Android. |
| +#if !defined(OS_ANDROID) |
| // content::RenderWidgetHost::InputEventObserver overrides. |
| void OnInputEvent(const blink::WebInputEvent&) override; |
| #endif |
| @@ -223,6 +229,10 @@ class ChromePasswordManagerClient |
| // navigation of the tab owning this ChromePasswordManagerClient. |
| base::Optional<ukm::SourceId> ukm_source_id_; |
| + // Whether navigator.credentials.store() was ever called from this |
| + // WebContents. Used for testing. |
| + bool was_store_ever_called_ = false; |
| + |
| DISALLOW_COPY_AND_ASSIGN(ChromePasswordManagerClient); |
| }; |