Chromium Code Reviews| Index: chrome/browser/password_manager/password_manager_test_base.h |
| diff --git a/chrome/browser/password_manager/password_manager_test_base.h b/chrome/browser/password_manager/password_manager_test_base.h |
| index 29d6887a66e7ea81e99ff4a8cb1594394594d5e4..5ba3909a1eb913e85eb6dd3440fdc8e859ce232e 100644 |
| --- a/chrome/browser/password_manager/password_manager_test_base.h |
| +++ b/chrome/browser/password_manager/password_manager_test_base.h |
| @@ -8,6 +8,8 @@ |
| #include "base/memory/ref_counted.h" |
| #include "base/memory/scoped_ptr.h" |
| #include "chrome/test/base/in_process_browser_test.h" |
| +#include "components/password_manager/core/browser/password_store_consumer.h" |
| +#include "components/password_manager/core/browser/test_password_store.h" |
|
vabr (Chromium)
2015/08/05 08:37:35
You do not need this.
xunlu
2015/08/05 18:37:13
Done.
|
| #include "content/public/browser/web_contents_observer.h" |
| #include "content/public/test/test_utils.h" |
| @@ -44,6 +46,25 @@ class NavigationObserver : public content::WebContentsObserver { |
| DISALLOW_COPY_AND_ASSIGN(NavigationObserver); |
| }; |
| +class PasswordStoreObserver : public password_manager::PasswordStoreConsumer { |
|
vabr (Chromium)
2015/08/05 08:37:35
I suggest against naming the class *Observer. It c
xunlu
2015/08/05 18:37:13
Done.
|
| + public: |
| + explicit PasswordStoreObserver(password_manager::TestPasswordStore*); |
|
vabr (Chromium)
2015/08/05 08:37:35
Please change TestPasswordStore references to Pass
xunlu
2015/08/05 18:37:13
Done.
|
| + ~PasswordStoreObserver() override; |
| + |
| + // password_manager::PasswordStoreConsumer |
| + void OnGetPasswordStoreResults( |
| + ScopedVector<autofill::PasswordForm> results) override; |
| + |
| + // Wait for test_password_store_ to respond to GetLogins(); |
| + void Wait(); |
|
vabr (Chromium)
2015/08/05 08:37:35
The name is too short and vague. Also, it seems st
xunlu
2015/08/05 18:37:13
Done.
|
| + |
| + private: |
| + scoped_refptr<content::MessageLoopRunner> message_loop_runner_; |
| + password_manager::TestPasswordStore* test_password_store_; |
| + |
| + DISALLOW_COPY_AND_ASSIGN(PasswordStoreObserver); |
| +}; |
| + |
| // Observes the save password prompt (bubble or infobar) for a specified |
| // WebContents, keeps track of whether or not it is currently shown, and allows |
| // accepting saving passwords through it. |