Index: components/autofill/core/browser/autocomplete_history_manager.h |
diff --git a/components/autofill/core/browser/autocomplete_history_manager.h b/components/autofill/core/browser/autocomplete_history_manager.h |
index 84f31b8276005c99bf5f417cdf5bd2d15bd6a91c..15c2ac625a505c68ecfc2b9b9c2d271fb5b4ba98 100644 |
--- a/components/autofill/core/browser/autocomplete_history_manager.h |
+++ b/components/autofill/core/browser/autocomplete_history_manager.h |
@@ -21,6 +21,7 @@ namespace autofill { |
class AutofillDriver; |
class AutofillExternalDelegate; |
+class AutofillManagerDelegate; |
struct FormData; |
// Per-tab Autocomplete history manager. Handles receiving form data |
@@ -28,7 +29,8 @@ struct FormData; |
// through WebDataServiceBase. |
class AutocompleteHistoryManager : public WebDataServiceConsumer { |
public: |
- explicit AutocompleteHistoryManager(AutofillDriver* driver); |
+ AutocompleteHistoryManager(AutofillDriver* driver, |
+ AutofillManagerDelegate* delegate); |
virtual ~AutocompleteHistoryManager(); |
// WebDataServiceConsumer implementation. |
@@ -46,7 +48,7 @@ class AutocompleteHistoryManager : public WebDataServiceConsumer { |
const std::vector<base::string16>& autofill_labels, |
const std::vector<base::string16>& autofill_icons, |
const std::vector<int>& autofill_unique_ids); |
- void OnFormSubmitted(const FormData& form); |
+ virtual void OnFormSubmitted(const FormData& form); |
// Must be public for the external delegate to use. |
void OnRemoveAutocompleteEntry(const base::string16& name, |
@@ -73,8 +75,6 @@ class AutocompleteHistoryManager : public WebDataServiceConsumer { |
AutofillDriver* driver_; |
scoped_refptr<AutofillWebDataService> autofill_data_; |
- BooleanPrefMember autofill_enabled_; |
- |
// When the manager makes a request from WebDataServiceBase, the database is |
// queried on another thread, we record the query handle until we get called |
// back. We also store the autofill results so we can send them together. |
@@ -89,6 +89,9 @@ class AutocompleteHistoryManager : public WebDataServiceConsumer { |
// our behalf. Weak. |
AutofillExternalDelegate* external_delegate_; |
+ // Delegate to provide whether or not autocomplete functionality is enabled. |
+ AutofillManagerDelegate* const manager_delegate_; |
+ |
// Whether IPC is sent. |
bool send_ipc_; |