diff options
Diffstat (limited to 'chrome/browser/webdata/web_data_service.h')
-rw-r--r-- | chrome/browser/webdata/web_data_service.h | 36 |
1 files changed, 34 insertions, 2 deletions
diff --git a/chrome/browser/webdata/web_data_service.h b/chrome/browser/webdata/web_data_service.h index 25a4e27..86a7af88 100644 --- a/chrome/browser/webdata/web_data_service.h +++ b/chrome/browser/webdata/web_data_service.h @@ -14,9 +14,11 @@ #include "chrome/common/scoped_vector.h" #include <map> -class GURL; -struct PasswordForm; +struct AutofillForm::Element; struct IE7PasswordInfo; +struct PasswordForm; +class AutofillForm; +class GURL; class ShutdownTask; class TemplateURL; @@ -46,6 +48,7 @@ typedef enum { PASSWORD_RESULT, // WDResult<std::vector<PasswordForm*>> PASSWORD_IE7_RESULT, // WDResult<IE7PasswordInfo> WEB_APP_IMAGES, // WDResult<WDAppImagesResult> + AUTOFILL_VALUE_RESULT, // WDResult<std::vector<std::wstring>> } WDResultType; // Result from GetWebAppImages. @@ -350,6 +353,25 @@ class WebDataService : public base::RefCountedThreadSafe<WebDataService> { // WebDataServiceConsumer is about to be deleted. void CancelRequest(Handle h); + ////////////////////////////////////////////////////////////////////////////// + // + // Autofill. + // + ////////////////////////////////////////////////////////////////////////////// + + // Schedules a task to add form elements to the web database. + void AddAutofillFormElements( + const std::vector<AutofillForm::Element>& elements); + + // Initiates the request for a vector of values which have been entered in + // form input fields named |name|. The method OnWebDataServiceRequestDone of + // |consumer| gets called back when the request is finished, with the vector + // included in the argument |result|. + Handle GetFormValuesForElementName(const std::wstring& name, + const std::wstring& prefix, + int limit, + WebDataServiceConsumer* consumer); + protected: friend class TemplateURLModelTest; friend class TemplateURLModelTestingProfile; @@ -416,6 +438,16 @@ class WebDataService : public base::RefCountedThreadSafe<WebDataService> { ////////////////////////////////////////////////////////////////////////////// // + // Autofill. + // + ////////////////////////////////////////////////////////////////////////////// + void AddAutofillFormElementsImpl( + GenericRequest<std::vector<AutofillForm::Element> >* request); + void GetFormValuesForElementNameImpl(WebDataRequest* request, + const std::wstring& name, const std::wstring& prefix, int limit); + + ////////////////////////////////////////////////////////////////////////////// + // // Web Apps. // ////////////////////////////////////////////////////////////////////////////// |