| 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 CHROME_BROWSER_HISTORY_HISTORY_SERVICE_H_ | 5 #ifndef CHROME_BROWSER_HISTORY_HISTORY_SERVICE_H_ |
| 6 #define CHROME_BROWSER_HISTORY_HISTORY_SERVICE_H_ | 6 #define CHROME_BROWSER_HISTORY_HISTORY_SERVICE_H_ |
| 7 | 7 |
| 8 #include <set> | 8 #include <set> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 305 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 316 int days_back, | 316 int days_back, |
| 317 const QueryMostVisitedURLsCallback& callback, | 317 const QueryMostVisitedURLsCallback& callback, |
| 318 base::CancelableTaskTracker* tracker); | 318 base::CancelableTaskTracker* tracker); |
| 319 | 319 |
| 320 // Request the |result_count| URLs filtered and sorted based on the |filter|. | 320 // Request the |result_count| URLs filtered and sorted based on the |filter|. |
| 321 // If |extended_info| is true, additional data will be provided in the | 321 // If |extended_info| is true, additional data will be provided in the |
| 322 // results. Computing this additional data is expensive, likely to become | 322 // results. Computing this additional data is expensive, likely to become |
| 323 // more expensive as additional data points are added in future changes, and | 323 // more expensive as additional data points are added in future changes, and |
| 324 // not useful in most cases. Set |extended_info| to true only if you | 324 // not useful in most cases. Set |extended_info| to true only if you |
| 325 // explicitly require the additional data. | 325 // explicitly require the additional data. |
| 326 typedef base::Callback<void(Handle, const history::FilteredURLList&)> | 326 typedef base::Callback<void(const history::FilteredURLList*)> |
| 327 QueryFilteredURLsCallback; | 327 QueryFilteredURLsCallback; |
| 328 | 328 |
| 329 Handle QueryFilteredURLs( | 329 base::CancelableTaskTracker::TaskId QueryFilteredURLs( |
| 330 int result_count, | 330 int result_count, |
| 331 const history::VisitFilter& filter, | 331 const history::VisitFilter& filter, |
| 332 bool extended_info, | 332 bool extended_info, |
| 333 CancelableRequestConsumerBase* consumer, | 333 const QueryFilteredURLsCallback& callback, |
| 334 const QueryFilteredURLsCallback& callback); | 334 base::CancelableTaskTracker* tracker); |
| 335 | 335 |
| 336 // Database management operations -------------------------------------------- | 336 // Database management operations -------------------------------------------- |
| 337 | 337 |
| 338 // Delete all the information related to a single url. | 338 // Delete all the information related to a single url. |
| 339 void DeleteURL(const GURL& url); | 339 void DeleteURL(const GURL& url); |
| 340 | 340 |
| 341 // Delete all the information related to a list of urls. (Deleting | 341 // Delete all the information related to a list of urls. (Deleting |
| 342 // URLs one by one is slow as it has to flush to disk each time.) | 342 // URLs one by one is slow as it has to flush to disk each time.) |
| 343 void DeleteURLsForTest(const std::vector<GURL>& urls); | 343 void DeleteURLsForTest(const std::vector<GURL>& urls); |
| 344 | 344 |
| (...skipping 669 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1014 scoped_ptr<history::InMemoryURLIndex> in_memory_url_index_; | 1014 scoped_ptr<history::InMemoryURLIndex> in_memory_url_index_; |
| 1015 | 1015 |
| 1016 ObserverList<history::VisitDatabaseObserver> visit_database_observers_; | 1016 ObserverList<history::VisitDatabaseObserver> visit_database_observers_; |
| 1017 | 1017 |
| 1018 history::DeleteDirectiveHandler delete_directive_handler_; | 1018 history::DeleteDirectiveHandler delete_directive_handler_; |
| 1019 | 1019 |
| 1020 DISALLOW_COPY_AND_ASSIGN(HistoryService); | 1020 DISALLOW_COPY_AND_ASSIGN(HistoryService); |
| 1021 }; | 1021 }; |
| 1022 | 1022 |
| 1023 #endif // CHROME_BROWSER_HISTORY_HISTORY_SERVICE_H_ | 1023 #endif // CHROME_BROWSER_HISTORY_HISTORY_SERVICE_H_ |
| OLD | NEW |