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

Unified Diff: components/autofill/browser/autocomplete_history_manager.h

Issue 15097004: Enable Autocomplete feature for chromium webview (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@setSaveFormData2
Patch Set: address nits 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/autocomplete_history_manager.h
diff --git a/components/autofill/browser/autocomplete_history_manager.h b/components/autofill/browser/autocomplete_history_manager.h
index bec877ad9670929651972503ebc425f686285b5c..b96615958ddd55f962f4215c735dfdcf195ec5af 100644
--- a/components/autofill/browser/autocomplete_history_manager.h
+++ b/components/autofill/browser/autocomplete_history_manager.h
@@ -8,7 +8,6 @@
#include <vector>
#include "base/gtest_prod_util.h"
-#include "base/prefs/pref_member.h"
#include "components/autofill/browser/webdata/autofill_webdata_service.h"
#include "components/webdata/common/web_data_service_consumer.h"
@@ -21,6 +20,7 @@ namespace autofill {
class AutofillDriver;
class AutofillExternalDelegate;
+class AutofillManagerDelegate;
struct FormData;
// Per-tab Autocomplete history manager. Handles receiving form data
@@ -28,7 +28,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 +47,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 +74,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 +88,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_;

Powered by Google App Engine
This is Rietveld 408576698