| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 // Chromium settings and storage represent user-selected preferences and | 5 // Chromium settings and storage represent user-selected preferences and |
| 6 // information and MUST not be extracted, overwritten or modified except | 6 // information and MUST not be extracted, overwritten or modified except |
| 7 // through Chromium defined APIs. | 7 // through Chromium defined APIs. |
| 8 | 8 |
| 9 #ifndef CHROME_BROWSER_WEBDATA_WEB_DATA_SERVICE_H__ | 9 #ifndef CHROME_BROWSER_WEBDATA_WEB_DATA_SERVICE_H__ |
| 10 #define CHROME_BROWSER_WEBDATA_WEB_DATA_SERVICE_H__ | 10 #define CHROME_BROWSER_WEBDATA_WEB_DATA_SERVICE_H__ |
| (...skipping 317 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 328 // | 328 // |
| 329 ////////////////////////////////////////////////////////////////////////////// | 329 ////////////////////////////////////////////////////////////////////////////// |
| 330 | 330 |
| 331 // As the database processes requests at a later date, all deletion is | 331 // As the database processes requests at a later date, all deletion is |
| 332 // done on the background thread. | 332 // done on the background thread. |
| 333 // | 333 // |
| 334 // Many of the keyword related methods do not return a handle. This is because | 334 // Many of the keyword related methods do not return a handle. This is because |
| 335 // the caller (TemplateURLService) does not need to know when the request is | 335 // the caller (TemplateURLService) does not need to know when the request is |
| 336 // done. | 336 // done. |
| 337 | 337 |
| 338 void AddKeyword(const TemplateURL& url); | 338 void AddKeyword(const TemplateURLData& data); |
| 339 void RemoveKeyword(TemplateURLID id); | 339 void RemoveKeyword(TemplateURLID id); |
| 340 void UpdateKeyword(const TemplateURL& url); | 340 void UpdateKeyword(const TemplateURLData& data); |
| 341 | 341 |
| 342 // Fetches the keywords. | 342 // Fetches the keywords. |
| 343 // On success, consumer is notified with WDResult<KeywordTable::Keywords>. | 343 // On success, consumer is notified with WDResult<KeywordTable::Keywords>. |
| 344 Handle GetKeywords(WebDataServiceConsumer* consumer); | 344 Handle GetKeywords(WebDataServiceConsumer* consumer); |
| 345 | 345 |
| 346 // Sets the keywords used for the default search provider. | 346 // Sets the keywords used for the default search provider. |
| 347 void SetDefaultSearchProvider(const TemplateURL* url); | 347 void SetDefaultSearchProvider(const TemplateURL* url); |
| 348 | 348 |
| 349 // Sets the version of the builtin keywords. | 349 // Sets the version of the builtin keywords. |
| 350 void SetBuiltinKeywordVersion(int version); | 350 void SetBuiltinKeywordVersion(int version); |
| (...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 590 void ScheduleCommit(); | 590 void ScheduleCommit(); |
| 591 | 591 |
| 592 // Return the next request handle. | 592 // Return the next request handle. |
| 593 int GetNextRequestHandle(); | 593 int GetNextRequestHandle(); |
| 594 | 594 |
| 595 ////////////////////////////////////////////////////////////////////////////// | 595 ////////////////////////////////////////////////////////////////////////////// |
| 596 // | 596 // |
| 597 // Keywords. | 597 // Keywords. |
| 598 // | 598 // |
| 599 ////////////////////////////////////////////////////////////////////////////// | 599 ////////////////////////////////////////////////////////////////////////////// |
| 600 void AddKeywordImpl(GenericRequest<TemplateURL>* request); | 600 void AddKeywordImpl(GenericRequest<TemplateURLData>* request); |
| 601 void RemoveKeywordImpl(GenericRequest<TemplateURLID>* request); | 601 void RemoveKeywordImpl(GenericRequest<TemplateURLID>* request); |
| 602 void UpdateKeywordImpl(GenericRequest<TemplateURL>* request); | 602 void UpdateKeywordImpl(GenericRequest<TemplateURLData>* request); |
| 603 void GetKeywordsImpl(WebDataRequest* request); | 603 void GetKeywordsImpl(WebDataRequest* request); |
| 604 void SetDefaultSearchProviderImpl(GenericRequest<TemplateURLID>* r); | 604 void SetDefaultSearchProviderImpl(GenericRequest<TemplateURLID>* r); |
| 605 void SetBuiltinKeywordVersionImpl(GenericRequest<int>* r); | 605 void SetBuiltinKeywordVersionImpl(GenericRequest<int>* r); |
| 606 | 606 |
| 607 ////////////////////////////////////////////////////////////////////////////// | 607 ////////////////////////////////////////////////////////////////////////////// |
| 608 // | 608 // |
| 609 // Web Apps. | 609 // Web Apps. |
| 610 // | 610 // |
| 611 ////////////////////////////////////////////////////////////////////////////// | 611 ////////////////////////////////////////////////////////////////////////////// |
| 612 void SetWebAppImageImpl(GenericRequest2<GURL, SkBitmap>* request); | 612 void SetWebAppImageImpl(GenericRequest2<GURL, SkBitmap>* request); |
| (...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 738 // result can be NULL, if no result is expected or if the database could | 738 // result can be NULL, if no result is expected or if the database could |
| 739 // not be opened. The result object is destroyed after this call. | 739 // not be opened. The result object is destroyed after this call. |
| 740 virtual void OnWebDataServiceRequestDone(WebDataService::Handle h, | 740 virtual void OnWebDataServiceRequestDone(WebDataService::Handle h, |
| 741 const WDTypedResult* result) = 0; | 741 const WDTypedResult* result) = 0; |
| 742 | 742 |
| 743 protected: | 743 protected: |
| 744 virtual ~WebDataServiceConsumer() {} | 744 virtual ~WebDataServiceConsumer() {} |
| 745 }; | 745 }; |
| 746 | 746 |
| 747 #endif // CHROME_BROWSER_WEBDATA_WEB_DATA_SERVICE_H__ | 747 #endif // CHROME_BROWSER_WEBDATA_WEB_DATA_SERVICE_H__ |
| OLD | NEW |