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

Unified Diff: components/autofill/browser/autofill_manager.cc

Issue 15097004: Enable Autocomplete feature for chromium webview (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@setSaveFormData2
Patch Set: enable autocomplete independent of autofill. 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/browser/autofill_manager.cc
diff --git a/components/autofill/browser/autofill_manager.cc b/components/autofill/browser/autofill_manager.cc
index e7b2171746ce9158104609e205bb0d90653e458a..fa39c045625ddc74f3889784226d8a24c9cced82 100644
--- a/components/autofill/browser/autofill_manager.cc
+++ b/components/autofill/browser/autofill_manager.cc
@@ -219,7 +219,7 @@ AutofillManager::AutofillManager(
manager_delegate_(delegate),
app_locale_(app_locale),
personal_data_(delegate->GetPersonalDataManager()),
- autocomplete_history_manager_(web_contents),
+ autocomplete_history_manager_(web_contents, delegate),
autocheckout_manager_(this),
metric_logger_(new AutofillMetrics),
has_logged_autofill_enabled_(false),
@@ -329,7 +329,7 @@ bool AutofillManager::OnMessageReceived(const IPC::Message& message) {
bool AutofillManager::OnFormSubmitted(const FormData& form,
const TimeTicks& timestamp) {
- // Let AutoComplete know as well.
+ // Let Autocomplete know as well.
autocomplete_history_manager_.OnFormSubmitted(form);
if (!IsAutofillEnabled())
@@ -864,7 +864,9 @@ std::string AutofillManager::GetAutocheckoutURLPrefix() const {
autofill::autocheckout::WhitelistManager* whitelist_manager =
manager_delegate_->GetAutocheckoutWhitelistManager();
- return whitelist_manager->GetMatchedURLPrefix(web_contents()->GetURL());
+ return whitelist_manager ?
+ whitelist_manager->GetMatchedURLPrefix(web_contents()->GetURL()) :
+ std::string();
}
bool AutofillManager::IsAutofillEnabled() const {
@@ -989,7 +991,7 @@ AutofillManager::AutofillManager(content::WebContents* web_contents,
manager_delegate_(delegate),
app_locale_("en-US"),
personal_data_(personal_data),
- autocomplete_history_manager_(web_contents),
+ autocomplete_history_manager_(web_contents, delegate),
autocheckout_manager_(this),
metric_logger_(new AutofillMetrics),
has_logged_autofill_enabled_(false),

Powered by Google App Engine
This is Rietveld 408576698