Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(247)

Unified Diff: chrome/browser/password_manager/password_manager.h

Issue 151413008: Move ownership of Password(Generation)Manager to ContentPasswordDriver. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Handle WebContents having no PasswordManagerDelegateImpl attached Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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 a63a66e608d9efe2ad32d31e22ce2b306e62d9ff..f19682cd870e3e72b41dd68a7d094b8a5daedd5e 100644
--- a/chrome/browser/password_manager/password_manager.h
+++ b/chrome/browser/password_manager/password_manager.h
@@ -18,7 +18,6 @@
#include "components/autofill/core/common/password_form.h"
#include "components/autofill/core/common/password_form_fill_data.h"
#include "content/public/browser/web_contents_observer.h"
-#include "content/public/browser/web_contents_user_data.h"
class PasswordManagerDelegate;
class PasswordManagerDriver;
@@ -34,17 +33,14 @@ class PrefRegistrySyncable;
// receiving password form data from the renderer and managing the password
// database through the PasswordStore. The PasswordManager is a LoginModel
// for purposes of supporting HTTP authentication dialogs.
-class PasswordManager : public LoginModel,
- public content::WebContentsObserver,
- public content::WebContentsUserData<PasswordManager> {
+class PasswordManager : public LoginModel, public content::WebContentsObserver {
public:
static void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry);
#if defined(OS_WIN)
static void RegisterLocalPrefs(PrefRegistrySimple* registry);
#endif
- static void CreateForWebContentsAndDelegate(
- content::WebContents* contents,
- PasswordManagerDelegate* delegate);
+ PasswordManager(content::WebContents* web_contents,
+ PasswordManagerDelegate* delegate);
virtual ~PasswordManager();
typedef base::Callback<void(const autofill::PasswordForm&)>
@@ -95,17 +91,12 @@ class PasswordManager : public LoginModel,
const std::vector<autofill::PasswordForm>& visible_forms);
protected:
- // Subclassed for unit tests.
- PasswordManager(content::WebContents* web_contents,
- PasswordManagerDelegate* delegate);
// Handle notification that a password form was submitted.
virtual void OnPasswordFormSubmitted(
const autofill::PasswordForm& password_form);
private:
- friend class content::WebContentsUserData<PasswordManager>;
-
enum ProvisionalSaveFailure {
SAVING_DISABLED,
EMPTY_PASSWORD,

Powered by Google App Engine
This is Rietveld 408576698