| Index: chrome/browser/password_manager/password_manager.h
|
| diff --git a/chrome/browser/password_manager/password_manager.h b/chrome/browser/password_manager/password_manager.h
|
| index 0552893c528a1ae72f69d7be1b262573fb7e66e9..bb229ed066bedd81dfd25cfd78435617865305b7 100644
|
| --- a/chrome/browser/password_manager/password_manager.h
|
| +++ b/chrome/browser/password_manager/password_manager.h
|
| @@ -6,7 +6,10 @@
|
| #define CHROME_BROWSER_PASSWORD_MANAGER_PASSWORD_MANAGER_H_
|
| #pragma once
|
|
|
| +#include <vector>
|
| +
|
| #include "base/memory/scoped_ptr.h"
|
| +#include "base/memory/scoped_vector.h"
|
| #include "base/stl_util.h"
|
| #include "chrome/browser/password_manager/password_form_manager.h"
|
| #include "chrome/browser/prefs/pref_member.h"
|
| @@ -38,7 +41,7 @@ class PasswordManager : public LoginModel,
|
| // on the page.
|
| void Autofill(const webkit::forms::PasswordForm& form_for_autofill,
|
| const webkit::forms::PasswordFormMap& best_matches,
|
| - const webkit::forms::PasswordForm* const preferred_match,
|
| + const webkit::forms::PasswordForm& preferred_match,
|
| bool wait_for_username) const;
|
|
|
| // LoginModel implementation.
|
| @@ -47,7 +50,7 @@ class PasswordManager : public LoginModel,
|
| // When a form is submitted, we prepare to save the password but wait
|
| // until we decide the user has successfully logged in. This is step 1
|
| // of 2 (see SavePassword).
|
| - void ProvisionallySavePassword(webkit::forms::PasswordForm form);
|
| + void ProvisionallySavePassword(const webkit::forms::PasswordForm& form);
|
|
|
| // content::WebContentsObserver overrides.
|
| virtual void DidStopLoading() OVERRIDE;
|
| @@ -62,8 +65,6 @@ class PasswordManager : public LoginModel,
|
| const std::vector<webkit::forms::PasswordForm>& visible_forms);
|
|
|
| private:
|
| - FRIEND_TEST_ALL_PREFIXES(PasswordManagerTest, FormSeenThenLeftPage);
|
| -
|
| // Note about how a PasswordFormManager can transition from
|
| // pending_login_managers_ to provisional_save_manager_ and the infobar.
|
| //
|
| @@ -78,20 +79,10 @@ class PasswordManager : public LoginModel,
|
| // When a form is "seen" on a page, a PasswordFormManager is created
|
| // and stored in this collection until user navigates away from page.
|
|
|
| - // Clear any pending saves
|
| - void ClearProvisionalSave();
|
| -
|
| - // Notification that the user navigated away from the current page.
|
| - // Unless this is a password form submission, for our purposes this
|
| - // means we're done with the current page, so we can clean-up.
|
| - void DidNavigate();
|
| -
|
| - typedef std::vector<PasswordFormManager*> LoginManagers;
|
| - LoginManagers pending_login_managers_;
|
| + // Is password autofill enabled for the current profile?
|
| + bool IsEnabled() const;
|
|
|
| - // Deleter for pending_login_managers_ when PasswordManager is deleted (e.g
|
| - // tab closes) on a page with a password form, thus containing login managers.
|
| - STLElementDeleter<LoginManagers> login_managers_deleter_;
|
| + ScopedVector<PasswordFormManager> pending_login_managers_;
|
|
|
| // When the user submits a password/credential, this contains the
|
| // PasswordFormManager for the form in question until we deem the login
|
| @@ -103,7 +94,7 @@ class PasswordManager : public LoginModel,
|
|
|
| // Our delegate for carrying out external operations. This is typically the
|
| // containing TabContents.
|
| - PasswordManagerDelegate* delegate_;
|
| + PasswordManagerDelegate* const delegate_;
|
|
|
| // The LoginModelObserver (i.e LoginView) requiring autofill.
|
| LoginModelObserver* observer_;
|
|
|