Chromium Code Reviews| 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 |