Index: chrome/browser/ui/browser_tab_contents.cc |
diff --git a/chrome/browser/ui/browser_tab_contents.cc b/chrome/browser/ui/browser_tab_contents.cc |
index 6877b7cfee5717f519df927058249d26dbb73db5..56d3204252fb00e1f43d1269cc820f671101de01 100644 |
--- a/chrome/browser/ui/browser_tab_contents.cc |
+++ b/chrome/browser/ui/browser_tab_contents.cc |
@@ -42,8 +42,8 @@ |
#include "chrome/browser/ui/tab_contents/core_tab_helper.h" |
#include "chrome/browser/ui/zoom/zoom_controller.h" |
#include "chrome/common/chrome_switches.h" |
-#include "components/autofill/browser/autofill_external_delegate.h" |
#include "components/autofill/browser/autofill_manager.h" |
+#include "components/autofill/content/browser/autofill_driver_impl.h" |
#include "components/web_modal/web_contents_modal_dialog_manager.h" |
#include "content/public/browser/web_contents.h" |
#include "extensions/browser/view_type_utils.h" |
@@ -70,7 +70,7 @@ |
#include "chrome/browser/ui/metro_pin_tab_helper_win.h" |
#endif |
-using autofill::AutofillExternalDelegate; |
+using autofill::AutofillDriverImpl; |
using autofill::AutofillManager; |
using autofill::TabAutofillManagerDelegate; |
using content::WebContents; |
@@ -109,18 +109,15 @@ void BrowserTabContents::AttachTabHelpers(WebContents* web_contents) { |
AlternateErrorPageTabObserver::CreateForWebContents(web_contents); |
TabAutofillManagerDelegate::CreateForWebContents(web_contents); |
- AutofillManager::CreateForWebContentsAndDelegate( |
+ bool native_autofill_ui_enabled = |
+ !CommandLine::ForCurrentProcess()->HasSwitch( |
+ switches::kDisableNativeAutofillUi); |
+ AutofillDriverImpl::CreateForWebContentsAndDelegate( |
web_contents, |
TabAutofillManagerDelegate::FromWebContents(web_contents), |
g_browser_process->GetApplicationLocale(), |
- AutofillManager::ENABLE_AUTOFILL_DOWNLOAD_MANAGER); |
- if (!CommandLine::ForCurrentProcess()->HasSwitch( |
- switches::kDisableNativeAutofillUi)) { |
- AutofillExternalDelegate::CreateForWebContentsAndManager( |
- web_contents, AutofillManager::FromWebContents(web_contents)); |
- AutofillManager::FromWebContents(web_contents)->SetExternalDelegate( |
- AutofillExternalDelegate::FromWebContents(web_contents)); |
- } |
+ AutofillManager::ENABLE_AUTOFILL_DOWNLOAD_MANAGER, |
+ native_autofill_ui_enabled); |
BlockedContentTabHelper::CreateForWebContents(web_contents); |
BookmarkTabHelper::CreateForWebContents(web_contents); |
chrome_browser_net::LoadTimeStatsTabHelper::CreateForWebContents( |