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

Unified Diff: android_webview/native/aw_contents.cc

Issue 15097004: Enable Autocomplete feature for chromium webview (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@setSaveFormData2
Patch Set: add a check that disappeared during a merge. 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
« no previous file with comments | « android_webview/browser/aw_browser_context.cc ('k') | android_webview/renderer/DEPS » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: android_webview/native/aw_contents.cc
diff --git a/android_webview/native/aw_contents.cc b/android_webview/native/aw_contents.cc
index 98c4e44c7a11a8bc0c1a83ee1303704503c30833..93f9f915503582d4bc60479d5c6b0d5ef83adfe6 100644
--- a/android_webview/native/aw_contents.cc
+++ b/android_webview/native/aw_contents.cc
@@ -139,8 +139,7 @@ AwContents::AwContents(scoped_ptr<WebContents> web_contents)
new AwRenderViewHostExt(this, web_contents_.get()));
AwAutofillManagerDelegate* autofill_manager_delegate =
- AwBrowserContext::FromWebContents(web_contents_.get())->
- AutofillManagerDelegate();
+ AwAutofillManagerDelegate::FromWebContents(web_contents_.get());
if (autofill_manager_delegate)
InitAutofillIfNecessary(autofill_manager_delegate->GetSaveFormData());
}
@@ -184,10 +183,8 @@ void AwContents::SetSaveFormData(bool enabled) {
// We need to check for the existence, since autofill_manager_delegate
// may not be created when the setting is false.
if (AutofillDriverImpl::FromWebContents(web_contents_.get())) {
- AwAutofillManagerDelegate* autofill_manager_delegate =
- AwBrowserContext::FromWebContents(web_contents_.get())->
- AutofillManagerDelegate();
- autofill_manager_delegate->SetSaveFormData(enabled);
+ AwAutofillManagerDelegate::FromWebContents(web_contents_.get())->
+ SetSaveFormData(enabled);
}
}
@@ -200,10 +197,12 @@ void AwContents::InitAutofillIfNecessary(bool enabled) {
if (AutofillDriverImpl::FromWebContents(web_contents))
return;
+ AwBrowserContext::FromWebContents(web_contents)->
+ CreateUserPrefServiceIfNecessary();
+ AwAutofillManagerDelegate::CreateForWebContents(web_contents);
AutofillDriverImpl::CreateForWebContentsAndDelegate(
web_contents,
- AwBrowserContext::FromWebContents(web_contents)->
- CreateAutofillManagerDelegate(enabled),
+ AwAutofillManagerDelegate::FromWebContents(web_contents),
l10n_util::GetDefaultLocale(),
AutofillManager::DISABLE_AUTOFILL_DOWNLOAD_MANAGER);
}
« no previous file with comments | « android_webview/browser/aw_browser_context.cc ('k') | android_webview/renderer/DEPS » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698