Chromium Code Reviews| Index: components/password_manager/core/browser/password_manager_driver.h |
| diff --git a/components/password_manager/core/browser/password_manager_driver.h b/components/password_manager/core/browser/password_manager_driver.h |
| index 5f7bd7a43d1980dade690f2dc89b98b1588a3447..515cebab32a7a82de1c8aa5d05f87dfc0cf2a14a 100644 |
| --- a/components/password_manager/core/browser/password_manager_driver.h |
| +++ b/components/password_manager/core/browser/password_manager_driver.h |
| @@ -8,6 +8,7 @@ |
| #include <vector> |
| #include "base/macros.h" |
| +#include "base/memory/weak_ptr.h" |
| #include "base/strings/string16.h" |
| namespace autofill { |
| @@ -27,8 +28,8 @@ class PasswordManager; |
| // (i.e., obtain information from it and give information to it). |
| class PasswordManagerDriver { |
| public: |
| - PasswordManagerDriver() {} |
| - virtual ~PasswordManagerDriver() {} |
| + PasswordManagerDriver(); |
| + virtual ~PasswordManagerDriver(); |
| // Fills forms matching |form_data|. |
| virtual void FillPasswordForm( |
| @@ -63,7 +64,12 @@ class PasswordManagerDriver { |
| // Returns the PasswordAutofillManager associated with this instance. |
| virtual PasswordAutofillManager* GetPasswordAutofillManager() = 0; |
| + // Returns a weak pointer to |this|. |
| + base::WeakPtr<PasswordManagerDriver> GetWeakPtr(); |
|
Evan Stade
2014/12/08 20:02:50
is there a reason not to use SupportsWeakPtr/AsWea
vabr (Chromium)
2014/12/09 12:55:46
Done. Thanks for pointing this out.
There is not r
|
| + |
| private: |
| + base::WeakPtrFactory<PasswordManagerDriver> weak_ptr_factory_; |
| + |
| DISALLOW_COPY_AND_ASSIGN(PasswordManagerDriver); |
| }; |