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

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

Issue 17450010: Create AutofillDriverImpl unit test. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Nits 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.cc
diff --git a/components/autofill/content/browser/autofill_driver_impl.cc b/components/autofill/content/browser/autofill_driver_impl.cc
index 4b76fb5fd17733b1fcaeb177565b519bdc318848..546a6a68499513603169824ff16b2cfc3c4392d6 100644
--- a/components/autofill/content/browser/autofill_driver_impl.cc
+++ b/components/autofill/content/browser/autofill_driver_impl.cc
@@ -55,10 +55,11 @@ AutofillDriverImpl::AutofillDriverImpl(
AutofillManager::AutofillDownloadManagerState enable_download_manager,
bool enable_native_ui)
: content::WebContentsObserver(web_contents),
- autofill_manager_(this, delegate, app_locale, enable_download_manager) {
+ autofill_manager_(new AutofillManager(
+ this, delegate, app_locale, enable_download_manager)) {
if (enable_native_ui) {
SetAutofillExternalDelegate(scoped_ptr<AutofillExternalDelegate>(
- new AutofillExternalDelegate(web_contents, &autofill_manager_)));
+ new AutofillExternalDelegate(web_contents, autofill_manager_.get())));
}
}
@@ -70,20 +71,20 @@ content::WebContents* AutofillDriverImpl::GetWebContents() {
bool AutofillDriverImpl::OnMessageReceived(const IPC::Message& message) {
// TODO(blundell): Move IPC handling into this class.
- return autofill_manager_.OnMessageReceived(message);
+ return autofill_manager_->OnMessageReceived(message);
}
void AutofillDriverImpl::DidNavigateMainFrame(
const content::LoadCommittedDetails& details,
const content::FrameNavigateParams& params) {
// TODO(blundell): Move the logic of this method into this class.
- autofill_manager_.DidNavigateMainFrame(details, params);
+ autofill_manager_->DidNavigateMainFrame(details, params);
}
void AutofillDriverImpl::SetAutofillExternalDelegate(
scoped_ptr<AutofillExternalDelegate> delegate) {
autofill_external_delegate_.reset(delegate.release());
- autofill_manager_.SetExternalDelegate(autofill_external_delegate_.get());
+ autofill_manager_->SetExternalDelegate(autofill_external_delegate_.get());
}
} // namespace autofill

Powered by Google App Engine
This is Rietveld 408576698