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

Unified Diff: components/autofill/content/browser/autofill_driver_impl.h

Issue 17450010: Create AutofillDriverImpl unit test. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase after conflict Created 7 years, 6 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: components/autofill/content/browser/autofill_driver_impl.h
diff --git a/components/autofill/content/browser/autofill_driver_impl.h b/components/autofill/content/browser/autofill_driver_impl.h
index 6181b80cc4f961a373f2e1543ae5387193f17b24..c8c852b0fde62f200576318297caf4d1e97360c2 100644
--- a/components/autofill/content/browser/autofill_driver_impl.h
+++ b/components/autofill/content/browser/autofill_driver_impl.h
@@ -53,9 +53,9 @@ class AutofillDriverImpl : public AutofillDriver,
void SetAutofillExternalDelegate(
scoped_ptr<AutofillExternalDelegate> delegate);
- AutofillManager* autofill_manager() { return &autofill_manager_; }
+ AutofillManager* autofill_manager() { return autofill_manager_.get(); }
- private:
+ protected:
AutofillDriverImpl(
content::WebContents* web_contents,
autofill::AutofillManagerDelegate* delegate,
@@ -69,13 +69,18 @@ class AutofillDriverImpl : public AutofillDriver,
const content::FrameNavigateParams& params) OVERRIDE;
virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE;
+ // Sets the manager to |manager| and sets |manager|'s external delegate
+ // to |autofill_external_delegate_|. Takes ownership of |manager|.
+ void SetAutofillManager(scoped_ptr<AutofillManager> manager);
+
+ private:
// AutofillExternalDelegate instance that this object instantiates in the
// case where the autofill native UI is enabled.
scoped_ptr<AutofillExternalDelegate> autofill_external_delegate_;
// AutofillManager instance via which this object drives the shared Autofill
// code.
- AutofillManager autofill_manager_;
+ scoped_ptr<AutofillManager> autofill_manager_;
};
} // namespace autofill
« no previous file with comments | « components/autofill/content/browser/DEPS ('k') | components/autofill/content/browser/autofill_driver_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698