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 <set> | 8 #include <set> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 324 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
335 typedef base::Callback<void(const FilteredURLList*)> | 335 typedef base::Callback<void(const FilteredURLList*)> |
336 QueryFilteredURLsCallback; | 336 QueryFilteredURLsCallback; |
337 | 337 |
338 base::CancelableTaskTracker::TaskId QueryFilteredURLs( | 338 base::CancelableTaskTracker::TaskId QueryFilteredURLs( |
339 int result_count, | 339 int result_count, |
340 const VisitFilter& filter, | 340 const VisitFilter& filter, |
341 bool extended_info, | 341 bool extended_info, |
342 const QueryFilteredURLsCallback& callback, | 342 const QueryFilteredURLsCallback& callback, |
343 base::CancelableTaskTracker* tracker); | 343 base::CancelableTaskTracker* tracker); |
344 | 344 |
| 345 // Statistics ---------------------------------------------------------------- |
| 346 |
| 347 // Gets the number of URLs as seen in chrome://history with infinite date |
| 348 // range. If a URL is visited in multiple days, the URL is counted once for |
| 349 // each day. For determination of the date, timestamps are converted to dates |
| 350 // using local time. |
| 351 typedef base::Callback<void(HistoryCountResult)> GetHistoryCountCallback; |
| 352 |
| 353 base::CancelableTaskTracker::TaskId GetHistoryCount( |
| 354 const GetHistoryCountCallback& callback, |
| 355 base::CancelableTaskTracker* tracker); |
| 356 |
345 // Database management operations -------------------------------------------- | 357 // Database management operations -------------------------------------------- |
346 | 358 |
347 // Delete all the information related to a single url. | 359 // Delete all the information related to a single url. |
348 void DeleteURL(const GURL& url); | 360 void DeleteURL(const GURL& url); |
349 | 361 |
350 // Delete all the information related to a list of urls. (Deleting | 362 // Delete all the information related to a list of urls. (Deleting |
351 // URLs one by one is slow as it has to flush to disk each time.) | 363 // URLs one by one is slow as it has to flush to disk each time.) |
352 void DeleteURLsForTest(const std::vector<GURL>& urls); | 364 void DeleteURLsForTest(const std::vector<GURL>& urls); |
353 | 365 |
354 // Removes all visits in the selected time range (including the | 366 // Removes all visits in the selected time range (including the |
(...skipping 490 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
845 | 857 |
846 // All vended weak pointers are invalidated in Cleanup(). | 858 // All vended weak pointers are invalidated in Cleanup(). |
847 base::WeakPtrFactory<HistoryService> weak_ptr_factory_; | 859 base::WeakPtrFactory<HistoryService> weak_ptr_factory_; |
848 | 860 |
849 DISALLOW_COPY_AND_ASSIGN(HistoryService); | 861 DISALLOW_COPY_AND_ASSIGN(HistoryService); |
850 }; | 862 }; |
851 | 863 |
852 } // namespace history | 864 } // namespace history |
853 | 865 |
854 #endif // COMPONENTS_HISTORY_CORE_BROWSER_HISTORY_SERVICE_H_ | 866 #endif // COMPONENTS_HISTORY_CORE_BROWSER_HISTORY_SERVICE_H_ |
OLD | NEW |