Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(118)

Side by Side Diff: chrome/browser/history/history_service.h

Issue 352623002: Port History::QueryMostVisitedURLs to use CancelableTaskTracker (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/browser/history/history_marshaling.h ('k') | chrome/browser/history/history_service.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 293 matching lines...) Expand 10 before | Expand all | Expand 10 after
304 // to all urls on the same scheme/host/port as |url|. This is only valid for 304 // to all urls on the same scheme/host/port as |url|. This is only valid for
305 // HTTP and HTTPS URLs. 305 // HTTP and HTTPS URLs.
306 base::CancelableTaskTracker::TaskId GetVisibleVisitCountToHost( 306 base::CancelableTaskTracker::TaskId GetVisibleVisitCountToHost(
307 const GURL& url, 307 const GURL& url,
308 const GetVisibleVisitCountToHostCallback& callback, 308 const GetVisibleVisitCountToHostCallback& callback,
309 base::CancelableTaskTracker* tracker); 309 base::CancelableTaskTracker* tracker);
310 310
311 // Request the |result_count| most visited URLs and the chain of 311 // Request the |result_count| most visited URLs and the chain of
312 // redirects leading to each of these URLs. |days_back| is the 312 // redirects leading to each of these URLs. |days_back| is the
313 // number of days of history to use. Used by TopSites. 313 // number of days of history to use. Used by TopSites.
314 typedef base::Callback<void(Handle, history::MostVisitedURLList)> 314 typedef base::Callback<void(const history::MostVisitedURLList*)>
blundell 2014/06/26 09:21:54 I think that we avoid const pointers in Chromium,
315 QueryMostVisitedURLsCallback; 315 QueryMostVisitedURLsCallback;
316 316
317 Handle QueryMostVisitedURLs(int result_count, int days_back, 317 base::CancelableTaskTracker::TaskId QueryMostVisitedURLs(
318 CancelableRequestConsumerBase* consumer, 318 int result_count,
319 const QueryMostVisitedURLsCallback& callback); 319 int days_back,
320 const QueryMostVisitedURLsCallback& callback,
321 base::CancelableTaskTracker* tracker);
320 322
321 // Request the |result_count| URLs filtered and sorted based on the |filter|. 323 // Request the |result_count| URLs filtered and sorted based on the |filter|.
322 // If |extended_info| is true, additional data will be provided in the 324 // If |extended_info| is true, additional data will be provided in the
323 // results. Computing this additional data is expensive, likely to become 325 // results. Computing this additional data is expensive, likely to become
324 // more expensive as additional data points are added in future changes, and 326 // more expensive as additional data points are added in future changes, and
325 // not useful in most cases. Set |extended_info| to true only if you 327 // not useful in most cases. Set |extended_info| to true only if you
326 // explicitly require the additional data. 328 // explicitly require the additional data.
327 typedef base::Callback<void(Handle, const history::FilteredURLList&)> 329 typedef base::Callback<void(Handle, const history::FilteredURLList&)>
328 QueryFilteredURLsCallback; 330 QueryFilteredURLsCallback;
329 331
(...skipping 685 matching lines...) Expand 10 before | Expand all | Expand 10 after
1015 scoped_ptr<history::InMemoryURLIndex> in_memory_url_index_; 1017 scoped_ptr<history::InMemoryURLIndex> in_memory_url_index_;
1016 1018
1017 ObserverList<history::VisitDatabaseObserver> visit_database_observers_; 1019 ObserverList<history::VisitDatabaseObserver> visit_database_observers_;
1018 1020
1019 history::DeleteDirectiveHandler delete_directive_handler_; 1021 history::DeleteDirectiveHandler delete_directive_handler_;
1020 1022
1021 DISALLOW_COPY_AND_ASSIGN(HistoryService); 1023 DISALLOW_COPY_AND_ASSIGN(HistoryService);
1022 }; 1024 };
1023 1025
1024 #endif // CHROME_BROWSER_HISTORY_HISTORY_SERVICE_H_ 1026 #endif // CHROME_BROWSER_HISTORY_HISTORY_SERVICE_H_
OLDNEW
« no previous file with comments | « chrome/browser/history/history_marshaling.h ('k') | chrome/browser/history/history_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698