| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CHROME_BROWSER_WEBDATA_WEB_DATA_SERVICE_H__ | 5 #ifndef CHROME_BROWSER_WEBDATA_WEB_DATA_SERVICE_H__ |
| 6 #define CHROME_BROWSER_WEBDATA_WEB_DATA_SERVICE_H__ | 6 #define CHROME_BROWSER_WEBDATA_WEB_DATA_SERVICE_H__ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 364 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 375 // |consumer| gets called back when the request is finished, with the vector | 375 // |consumer| gets called back when the request is finished, with the vector |
| 376 // included in the argument |result|. | 376 // included in the argument |result|. |
| 377 Handle GetFormValuesForElementName(const std::wstring& name, | 377 Handle GetFormValuesForElementName(const std::wstring& name, |
| 378 const std::wstring& prefix, | 378 const std::wstring& prefix, |
| 379 int limit, | 379 int limit, |
| 380 WebDataServiceConsumer* consumer); | 380 WebDataServiceConsumer* consumer); |
| 381 | 381 |
| 382 // Removes form elements recorded for autofill from the database. | 382 // Removes form elements recorded for autofill from the database. |
| 383 void RemoveFormElementsAddedBetween(const base::Time& delete_begin, | 383 void RemoveFormElementsAddedBetween(const base::Time& delete_begin, |
| 384 const base::Time& delete_end); | 384 const base::Time& delete_end); |
| 385 void RemoveFormValueForElementName(const std::wstring& name, |
| 386 const std::wstring& value); |
| 385 | 387 |
| 386 protected: | 388 protected: |
| 387 friend class TemplateURLModelTest; | 389 friend class TemplateURLModelTest; |
| 388 friend class TemplateURLModelTestingProfile; | 390 friend class TemplateURLModelTestingProfile; |
| 389 friend class WebDataServiceTest; | 391 friend class WebDataServiceTest; |
| 390 friend class WebDataRequest; | 392 friend class WebDataRequest; |
| 391 | 393 |
| 392 // This is invoked by the unit test; path is the path of the Web Data file. | 394 // This is invoked by the unit test; path is the path of the Web Data file. |
| 393 bool InitWithPath(const FilePath& path); | 395 bool InitWithPath(const FilePath& path); |
| 394 | 396 |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 453 // | 455 // |
| 454 // Autofill. | 456 // Autofill. |
| 455 // | 457 // |
| 456 ////////////////////////////////////////////////////////////////////////////// | 458 ////////////////////////////////////////////////////////////////////////////// |
| 457 void AddAutofillFormElementsImpl( | 459 void AddAutofillFormElementsImpl( |
| 458 GenericRequest<std::vector<AutofillForm::Element> >* request); | 460 GenericRequest<std::vector<AutofillForm::Element> >* request); |
| 459 void GetFormValuesForElementNameImpl(WebDataRequest* request, | 461 void GetFormValuesForElementNameImpl(WebDataRequest* request, |
| 460 const std::wstring& name, const std::wstring& prefix, int limit); | 462 const std::wstring& name, const std::wstring& prefix, int limit); |
| 461 void RemoveFormElementsAddedBetweenImpl( | 463 void RemoveFormElementsAddedBetweenImpl( |
| 462 GenericRequest2<base::Time, base::Time>* request); | 464 GenericRequest2<base::Time, base::Time>* request); |
| 465 void RemoveFormValueForElementNameImpl( |
| 466 GenericRequest2<std::wstring, std::wstring>* request); |
| 463 | 467 |
| 464 ////////////////////////////////////////////////////////////////////////////// | 468 ////////////////////////////////////////////////////////////////////////////// |
| 465 // | 469 // |
| 466 // Web Apps. | 470 // Web Apps. |
| 467 // | 471 // |
| 468 ////////////////////////////////////////////////////////////////////////////// | 472 ////////////////////////////////////////////////////////////////////////////// |
| 469 | 473 |
| 470 void SetWebAppImageImpl(GenericRequest2<GURL,SkBitmap>* request); | 474 void SetWebAppImageImpl(GenericRequest2<GURL,SkBitmap>* request); |
| 471 | 475 |
| 472 void SetWebAppHasAllImagesImpl(GenericRequest2<GURL,bool>* request); | 476 void SetWebAppHasAllImagesImpl(GenericRequest2<GURL,bool>* request); |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 522 public: | 526 public: |
| 523 | 527 |
| 524 // Called when a request is done. h uniquely identifies the request. | 528 // Called when a request is done. h uniquely identifies the request. |
| 525 // result can be NULL, if no result is expected or if the database could | 529 // result can be NULL, if no result is expected or if the database could |
| 526 // not be opened. The result object is destroyed after this call. | 530 // not be opened. The result object is destroyed after this call. |
| 527 virtual void OnWebDataServiceRequestDone(WebDataService::Handle h, | 531 virtual void OnWebDataServiceRequestDone(WebDataService::Handle h, |
| 528 const WDTypedResult* result) = 0; | 532 const WDTypedResult* result) = 0; |
| 529 }; | 533 }; |
| 530 | 534 |
| 531 #endif // CHROME_BROWSER_WEBDATA_WEB_DATA_SERVICE_H__ | 535 #endif // CHROME_BROWSER_WEBDATA_WEB_DATA_SERVICE_H__ |
| OLD | NEW |