| 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 326 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 ---------------------------------------------------------------- | 345 // Statistics ---------------------------------------------------------------- |
| 346 | 346 |
| 347 // Gets the number of URLs as seen in chrome://history with infinite date | 347 // Gets the number of URLs as seen in chrome://history within the time range |
| 348 // range. If a URL is visited in multiple days, the URL is counted once for | 348 // [|begin_time|, |end_time|). Each URL is counted only once per day. For |
| 349 // each day. For determination of the date, timestamps are converted to dates | 349 // determination of the date, timestamps are converted to dates using local |
| 350 // using local time. | 350 // time. |
| 351 typedef base::Callback<void(HistoryCountResult)> GetHistoryCountCallback; | 351 typedef base::Callback<void(HistoryCountResult)> GetHistoryCountCallback; |
| 352 | 352 |
| 353 base::CancelableTaskTracker::TaskId GetHistoryCount( | 353 base::CancelableTaskTracker::TaskId GetHistoryCount( |
| 354 const base::Time& begin_time, |
| 355 const base::Time& end_time, |
| 354 const GetHistoryCountCallback& callback, | 356 const GetHistoryCountCallback& callback, |
| 355 base::CancelableTaskTracker* tracker); | 357 base::CancelableTaskTracker* tracker); |
| 356 | 358 |
| 357 // Database management operations -------------------------------------------- | 359 // Database management operations -------------------------------------------- |
| 358 | 360 |
| 359 // Delete all the information related to a single url. | 361 // Delete all the information related to a single url. |
| 360 void DeleteURL(const GURL& url); | 362 void DeleteURL(const GURL& url); |
| 361 | 363 |
| 362 // Delete all the information related to a list of urls. (Deleting | 364 // Delete all the information related to a list of urls. (Deleting |
| 363 // URLs one by one is slow as it has to flush to disk each time.) | 365 // URLs one by one is slow as it has to flush to disk each time.) |
| (...skipping 493 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 857 | 859 |
| 858 // All vended weak pointers are invalidated in Cleanup(). | 860 // All vended weak pointers are invalidated in Cleanup(). |
| 859 base::WeakPtrFactory<HistoryService> weak_ptr_factory_; | 861 base::WeakPtrFactory<HistoryService> weak_ptr_factory_; |
| 860 | 862 |
| 861 DISALLOW_COPY_AND_ASSIGN(HistoryService); | 863 DISALLOW_COPY_AND_ASSIGN(HistoryService); |
| 862 }; | 864 }; |
| 863 | 865 |
| 864 } // namespace history | 866 } // namespace history |
| 865 | 867 |
| 866 #endif // COMPONENTS_HISTORY_CORE_BROWSER_HISTORY_SERVICE_H_ | 868 #endif // COMPONENTS_HISTORY_CORE_BROWSER_HISTORY_SERVICE_H_ |
| OLD | NEW |