| 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 #ifndef COMPONENTS_HISTORY_CORE_BROWSER_HISTORY_SERVICE_H_ | 5 #ifndef COMPONENTS_HISTORY_CORE_BROWSER_HISTORY_SERVICE_H_ |
| 6 #define COMPONENTS_HISTORY_CORE_BROWSER_HISTORY_SERVICE_H_ | 6 #define COMPONENTS_HISTORY_CORE_BROWSER_HISTORY_SERVICE_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 #include <stdint.h> | 9 #include <stdint.h> |
| 10 | 10 |
| (...skipping 403 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 414 | 414 |
| 415 // Begins a history request to retrieve the state of all downloads in the | 415 // Begins a history request to retrieve the state of all downloads in the |
| 416 // history db. 'callback' runs when the history service request is complete, | 416 // history db. 'callback' runs when the history service request is complete, |
| 417 // at which point 'info' contains an array of DownloadRow, one per | 417 // at which point 'info' contains an array of DownloadRow, one per |
| 418 // download. The callback is called on the thread that calls QueryDownloads(). | 418 // download. The callback is called on the thread that calls QueryDownloads(). |
| 419 void QueryDownloads(const DownloadQueryCallback& callback); | 419 void QueryDownloads(const DownloadQueryCallback& callback); |
| 420 | 420 |
| 421 // Called to update the history service about the current state of a download. | 421 // Called to update the history service about the current state of a download. |
| 422 // This is a 'fire and forget' query, so just pass the relevant state info to | 422 // This is a 'fire and forget' query, so just pass the relevant state info to |
| 423 // the database with no need for a callback. | 423 // the database with no need for a callback. |
| 424 void UpdateDownload(const DownloadRow& data); | 424 void UpdateDownload(const DownloadRow& data, bool should_commit_immediately); |
| 425 | 425 |
| 426 // Permanently remove some downloads from the history system. This is a 'fire | 426 // Permanently remove some downloads from the history system. This is a 'fire |
| 427 // and forget' operation. | 427 // and forget' operation. |
| 428 void RemoveDownloads(const std::set<uint32_t>& ids); | 428 void RemoveDownloads(const std::set<uint32_t>& ids); |
| 429 | 429 |
| 430 // Keyword search terms ----------------------------------------------------- | 430 // Keyword search terms ----------------------------------------------------- |
| 431 | 431 |
| 432 // Sets the search terms for the specified url and keyword. url_id gives the | 432 // Sets the search terms for the specified url and keyword. url_id gives the |
| 433 // id of the url, keyword_id the id of the keyword and term the search term. | 433 // id of the url, keyword_id the id of the keyword and term the search term. |
| 434 void SetKeywordSearchTermsForURL(const GURL& url, | 434 void SetKeywordSearchTermsForURL(const GURL& url, |
| (...skipping 397 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 832 | 832 |
| 833 // All vended weak pointers are invalidated in Cleanup(). | 833 // All vended weak pointers are invalidated in Cleanup(). |
| 834 base::WeakPtrFactory<HistoryService> weak_ptr_factory_; | 834 base::WeakPtrFactory<HistoryService> weak_ptr_factory_; |
| 835 | 835 |
| 836 DISALLOW_COPY_AND_ASSIGN(HistoryService); | 836 DISALLOW_COPY_AND_ASSIGN(HistoryService); |
| 837 }; | 837 }; |
| 838 | 838 |
| 839 } // namespace history | 839 } // namespace history |
| 840 | 840 |
| 841 #endif // COMPONENTS_HISTORY_CORE_BROWSER_HISTORY_SERVICE_H_ | 841 #endif // COMPONENTS_HISTORY_CORE_BROWSER_HISTORY_SERVICE_H_ |
| OLD | NEW |