diff options
author | petersont@google.com <petersont@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-11-08 02:38:04 +0000 |
---|---|---|
committer | petersont@google.com <petersont@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-11-08 02:38:04 +0000 |
commit | f0961cfdecddaaac9c89fb65c67ba3377d066043 (patch) | |
tree | 61ad1f994b2130b8fbc67555d08319c14fa5793b /chrome/browser/autofill_manager.h | |
parent | d893ab9643e5284db08087bc7514f59e37d6b319 (diff) | |
download | chromium_src-f0961cfdecddaaac9c89fb65c67ba3377d066043.zip chromium_src-f0961cfdecddaaac9c89fb65c67ba3377d066043.tar.gz chromium_src-f0961cfdecddaaac9c89fb65c67ba3377d066043.tar.bz2 |
Review URL: http://codereview.chromium.org/10237
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@5059 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/autofill_manager.h')
-rw-r--r-- | chrome/browser/autofill_manager.h | 28 |
1 files changed, 12 insertions, 16 deletions
diff --git a/chrome/browser/autofill_manager.h b/chrome/browser/autofill_manager.h index 72a04d4..fac533f 100644 --- a/chrome/browser/autofill_manager.h +++ b/chrome/browser/autofill_manager.h @@ -9,22 +9,22 @@ #include <string> #include "chrome/browser/webdata/web_data_service.h" -#include "chrome/common/pref_member.h" +#include "chrome/browser/web_contents.h" #include "webkit/glue/autofill_form.h" class Profile; -class WebContents; // Per-tab autofill manager. Handles receiving form data from the renderer and // the storing and retrieving of form data through WebDataService. class AutofillManager : public WebDataServiceConsumer { public: - explicit AutofillManager(WebContents* web_contents); + explicit AutofillManager(WebContents* web_contents) + : query_is_pending_(false), web_contents_(web_contents) {} virtual ~AutofillManager(); - void CancelPendingQuery(); + void ClearPendingQuery(); - Profile* profile(); + Profile* profile() { return web_contents_->profile(); } // Called when a form is submitted (i.e. when the user hits the submit button) // to store the form entries in the profile's sql database. @@ -32,11 +32,8 @@ class AutofillManager : public WebDataServiceConsumer { // Starts a query into the database for the values corresponding to name. // OnWebDataServiceRequestDone gets called when the query completes. - void FetchValuesForName(const std::wstring& name, - const std::wstring& prefix, - int limit, - int64 node_id, - int request_id); + void FetchValuesForName(const std::wstring& name, const std::wstring& prefix, + int limit); // WebDataServiceConsumer implementation. virtual void OnWebDataServiceRequestDone(WebDataService::Handle h, @@ -46,15 +43,14 @@ class AutofillManager : public WebDataServiceConsumer { void StoreFormEntriesInWebDatabase(const AutofillForm& form); WebContents* web_contents_; - - BooleanPrefMember form_autofill_enabled_; - + // When the manager makes a request from WebDataService, the database - // is queried on another thread, we record the query handle until we + // is queried on another thread, we record the query in this map until we // get called back. + bool query_is_pending_; WebDataService::Handle pending_query_handle_; - int64 node_id_; - int request_id_; + std::wstring pending_query_name_; + std::wstring pending_query_prefix_; DISALLOW_COPY_AND_ASSIGN(AutofillManager); }; |