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

Unified Diff: chrome/browser/autofill/autofill_manager.h

Issue 10837363: Introduce AutofillClient and use it to get rid of PasswordManager dependency. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 4 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/autofill/autofill_manager.h
diff --git a/chrome/browser/autofill/autofill_manager.h b/chrome/browser/autofill/autofill_manager.h
index f2db3cef0d8a0b9ab9d988f81ffa1fa0e62ff732..f5400dcbadcc59f330fce525c82bcb4c5999ec5a 100644
--- a/chrome/browser/autofill/autofill_manager.h
+++ b/chrome/browser/autofill/autofill_manager.h
@@ -41,6 +41,7 @@ class TabContents;
struct ViewHostMsg_FrameNavigate_Params;
namespace autofill {
+class AutofillClient;
class PasswordGenerator;
}
@@ -73,7 +74,10 @@ class AutofillManager : public content::NotificationObserver,
public ProfileSyncServiceObserver,
public base::RefCounted<AutofillManager> {
public:
- explicit AutofillManager(TabContents* tab_contents);
+ // Lifetime of |client| and |tab_contents| must exceed lifetime of
+ // AutofillManager.
+ explicit AutofillManager(autofill::AutofillClient* client,
+ TabContents* tab_contents);
// Registers our Enable/Disable Autofill pref.
static void RegisterUserPrefs(PrefServiceBase* prefs);
@@ -117,7 +121,8 @@ class AutofillManager : public content::NotificationObserver,
typedef std::pair<std::string, size_t> GUIDPair;
// Test code should prefer to use this constructor.
- AutofillManager(TabContents* tab_contents,
+ AutofillManager(autofill::AutofillClient* client,
+ TabContents* tab_contents,
PersonalDataManager* personal_data);
// Returns the value of the AutofillEnabled pref.
@@ -169,6 +174,9 @@ class AutofillManager : public content::NotificationObserver,
bool OnFormSubmitted(const webkit::forms::FormData& form,
const base::TimeTicks& timestamp);
+ // The AutofillClient.
+ autofill::AutofillClient* client_;
Ilya Sherman 2012/08/22 03:38:03 nit: Please make this private, and expose accessor
Ilya Sherman 2012/08/22 03:38:03 nit: Can this be a const member?
Jói 2012/08/22 17:15:53 Any subclass would seem to need this, so I think i
Jói 2012/08/22 17:15:53 Done.
Ilya Sherman 2012/08/22 21:47:59 A subclass would presumably only need a getter. I
Jói 2012/08/23 09:50:40 Right now, the subclasses don't use the member (my
+
private:
// content::WebContentsObserver:
virtual void RenderViewCreated(content::RenderViewHost* host) OVERRIDE;

Powered by Google App Engine
This is Rietveld 408576698