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