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

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

Issue 17225008: Eliminate AutofillExternalDelegate being a WebContentsUserData (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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 02963520d9e218aaacca8bf618afd6b390f49196..673eeafa7122d7a9e8594586e340b3ee0e8f08a2 100644
--- a/components/autofill/content/browser/autofill_driver_impl.cc
+++ b/components/autofill/content/browser/autofill_driver_impl.cc
@@ -57,12 +57,8 @@ AutofillDriverImpl::AutofillDriverImpl(
: content::WebContentsObserver(web_contents),
autofill_manager_(this, delegate, app_locale, enable_download_manager) {
if (enable_native_ui) {
- // TODO(blundell): Eliminate AutofillExternalDelegate being a WCUD and
- // transfer ownership of it to this class.
- AutofillExternalDelegate::CreateForWebContentsAndManager(
- web_contents, &autofill_manager_);
- autofill_manager_.SetExternalDelegate(
- AutofillExternalDelegate::FromWebContents(web_contents));
+ SetAutofillExternalDelegate(scoped_ptr<AutofillExternalDelegate>(
+ new AutofillExternalDelegate(web_contents, &autofill_manager_)));
Ilya Sherman 2013/06/17 21:25:12 nit: Reduce indentation by two spaces. You might
blundell 2013/06/18 06:20:47 This indentation of 4 spaces is correct I believe,
}
}
@@ -84,4 +80,11 @@ void AutofillDriverImpl::DidNavigateMainFrame(
autofill_manager_.DidNavigateMainFrame(details, params);
}
+void AutofillDriverImpl::SetAutofillExternalDelegate(
+ scoped_ptr<AutofillExternalDelegate> delegate)
+{
Ilya Sherman 2013/06/17 21:25:12 nit: Curly brace should be on the previous line.
blundell 2013/06/18 06:20:47 Done.
+ autofill_external_delegate_.reset(delegate.release());
+ autofill_manager_.SetExternalDelegate(autofill_external_delegate_.get());
Ilya Sherman 2013/06/17 21:25:12 nit: Reduce indentation by two spaces.
blundell 2013/06/18 06:20:47 Done.
+}
+
} // namespace autofill

Powered by Google App Engine
This is Rietveld 408576698