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 // Returns the count of URLs in the url database. The argument is the count. | |
msramek
2015/09/14 17:28:16
I'd suggest omitting this comment. The fact that t
lwchkg
2015/09/15 14:27:08
Thanks. Just forgot to update the comment here.
| |
348 // The count is zero if query to the database failed. | |
349 typedef base::Callback<void(HistoryCountResult)> GetHistoryCountCallback; | |
msramek
2015/09/14 17:28:16
This shouldn't be called "Get", as it's not a gett
lwchkg
2015/09/15 14:27:08
Puzzled here. This is the callback function in Get
msramek
2015/09/16 11:16:30
Oh... of course :) Sorry for that.
| |
350 | |
351 // Returns the count of URLs in the url database. | |
msramek
2015/09/14 17:28:16
Please update the comment to explain that we're co
lwchkg
2015/09/15 14:27:08
Acknowledged.
| |
352 base::CancelableTaskTracker::TaskId GetHistoryCount( | |
353 const GetHistoryCountCallback& callback, | |
354 base::CancelableTaskTracker* tracker); | |
355 | |
345 // Database management operations -------------------------------------------- | 356 // Database management operations -------------------------------------------- |
346 | 357 |
347 // Delete all the information related to a single url. | 358 // Delete all the information related to a single url. |
348 void DeleteURL(const GURL& url); | 359 void DeleteURL(const GURL& url); |
349 | 360 |
350 // Delete all the information related to a list of urls. (Deleting | 361 // 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.) | 362 // URLs one by one is slow as it has to flush to disk each time.) |
352 void DeleteURLsForTest(const std::vector<GURL>& urls); | 363 void DeleteURLsForTest(const std::vector<GURL>& urls); |
353 | 364 |
354 // Removes all visits in the selected time range (including the | 365 // Removes all visits in the selected time range (including the |
(...skipping 490 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
845 | 856 |
846 // All vended weak pointers are invalidated in Cleanup(). | 857 // All vended weak pointers are invalidated in Cleanup(). |
847 base::WeakPtrFactory<HistoryService> weak_ptr_factory_; | 858 base::WeakPtrFactory<HistoryService> weak_ptr_factory_; |
848 | 859 |
849 DISALLOW_COPY_AND_ASSIGN(HistoryService); | 860 DISALLOW_COPY_AND_ASSIGN(HistoryService); |
850 }; | 861 }; |
851 | 862 |
852 } // namespace history | 863 } // namespace history |
853 | 864 |
854 #endif // COMPONENTS_HISTORY_CORE_BROWSER_HISTORY_SERVICE_H_ | 865 #endif // COMPONENTS_HISTORY_CORE_BROWSER_HISTORY_SERVICE_H_ |
OLD | NEW |