Index: components/autofill/browser/autofill_manager.cc |
diff --git a/components/autofill/browser/autofill_manager.cc b/components/autofill/browser/autofill_manager.cc |
index d6a5e838d8ad557f8f656c2baaa1e49ebed6c23e..717ca12aec7fe9ad76d55983a6d2b794c15eae1b 100644 |
--- a/components/autofill/browser/autofill_manager.cc |
+++ b/components/autofill/browser/autofill_manager.cc |
@@ -191,7 +191,8 @@ AutofillManager::AutofillManager( |
manager_delegate_(delegate), |
app_locale_(app_locale), |
personal_data_(delegate->GetPersonalDataManager()), |
- autocomplete_history_manager_(driver), |
+ autocomplete_history_manager_( |
+ new AutocompleteHistoryManager(driver, delegate)), |
autocheckout_manager_(this), |
metric_logger_(new AutofillMetrics), |
has_logged_autofill_enabled_(false), |
@@ -252,7 +253,7 @@ void AutofillManager::SetExternalDelegate(AutofillExternalDelegate* delegate) { |
// work if the delegate has a pointer to the AutofillManager, but |
// future directions may not need such a pointer. |
external_delegate_ = delegate; |
- autocomplete_history_manager_.SetExternalDelegate(delegate); |
+ autocomplete_history_manager_->SetExternalDelegate(delegate); |
} |
bool AutofillManager::IsNativeUiEnabled() { |
@@ -304,8 +305,8 @@ bool AutofillManager::OnMessageReceived(const IPC::Message& message) { |
bool AutofillManager::OnFormSubmitted(const FormData& form, |
const TimeTicks& timestamp) { |
- // Let AutoComplete know as well. |
- autocomplete_history_manager_.OnFormSubmitted(form); |
+ // Let Autocomplete know as well. |
+ autocomplete_history_manager_->OnFormSubmitted(form); |
if (!IsAutofillEnabled()) |
return false; |
@@ -539,7 +540,7 @@ void AutofillManager::OnQueryFormFieldAutofill(int query_id, |
// Add the results from AutoComplete. They come back asynchronously, so we |
// hand off what we generated and they will send the results back to the |
// renderer. |
- autocomplete_history_manager_.OnGetAutocompleteSuggestions( |
+ autocomplete_history_manager_->OnGetAutocompleteSuggestions( |
query_id, field.name, field.value, values, labels, icons, unique_ids); |
} |
@@ -693,7 +694,7 @@ void AutofillManager::RemoveAutofillProfileOrCreditCard(int unique_id) { |
void AutofillManager::RemoveAutocompleteEntry(const base::string16& name, |
const base::string16& value) { |
- autocomplete_history_manager_.OnRemoveAutocompleteEntry(name, value); |
+ autocomplete_history_manager_->OnRemoveAutocompleteEntry(name, value); |
} |
content::WebContents* AutofillManager::GetWebContents() const { |
@@ -965,7 +966,8 @@ AutofillManager::AutofillManager(AutofillDriver* driver, |
manager_delegate_(delegate), |
app_locale_("en-US"), |
personal_data_(personal_data), |
- autocomplete_history_manager_(driver), |
+ autocomplete_history_manager_( |
+ new AutocompleteHistoryManager(driver, delegate)), |
autocheckout_manager_(this), |
metric_logger_(new AutofillMetrics), |
has_logged_autofill_enabled_(false), |