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

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

Issue 351363002: Revert of Port HistoryService::GetVisibleVisitCountToHost to CancelableTaskTracker (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 5 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 273 matching lines...) Expand 10 before | Expand all | Expand 10 after
284 base::CancelableTaskTracker* tracker); 284 base::CancelableTaskTracker* tracker);
285 285
286 // Schedules a query to get the most recent redirects ending at the given 286 // Schedules a query to get the most recent redirects ending at the given
287 // URL. 287 // URL.
288 base::CancelableTaskTracker::TaskId QueryRedirectsTo( 288 base::CancelableTaskTracker::TaskId QueryRedirectsTo(
289 const GURL& to_url, 289 const GURL& to_url,
290 const QueryRedirectsCallback& callback, 290 const QueryRedirectsCallback& callback,
291 base::CancelableTaskTracker* tracker); 291 base::CancelableTaskTracker* tracker);
292 292
293 typedef base::Callback< 293 typedef base::Callback<
294 void(bool, // Were we able to determine the # of visits? 294 void(Handle,
295 int, // Number of visits. 295 bool, // Were we able to determine the # of visits?
296 base::Time)> // Time of first visit. Only set if bool 296 int, // Number of visits.
297 // is true and int is > 0. 297 base::Time)> // Time of first visit. Only set if bool
298 // is true and int is > 0.
298 GetVisibleVisitCountToHostCallback; 299 GetVisibleVisitCountToHostCallback;
299 300
300 // Requests the number of user-visible visits (i.e. no redirects or subframes) 301 // Requests the number of user-visible visits (i.e. no redirects or subframes)
301 // to all urls on the same scheme/host/port as |url|. This is only valid for 302 // to all urls on the same scheme/host/port as |url|. This is only valid for
302 // HTTP and HTTPS URLs. 303 // HTTP and HTTPS URLs.
303 base::CancelableTaskTracker::TaskId GetVisibleVisitCountToHost( 304 Handle GetVisibleVisitCountToHost(
304 const GURL& url, 305 const GURL& url,
305 const GetVisibleVisitCountToHostCallback& callback, 306 CancelableRequestConsumerBase* consumer,
306 base::CancelableTaskTracker* tracker); 307 const GetVisibleVisitCountToHostCallback& callback);
307 308
308 // Called when QueryTopURLsAndRedirects completes. The vector contains a list 309 // Called when QueryTopURLsAndRedirects completes. The vector contains a list
309 // of the top |result_count| URLs. For each of these URLs, there is an entry 310 // of the top |result_count| URLs. For each of these URLs, there is an entry
310 // in the map containing redirects from the URL. For example, if we have the 311 // in the map containing redirects from the URL. For example, if we have the
311 // redirect chain A -> B -> C and A is a top visited URL, then A will be in 312 // redirect chain A -> B -> C and A is a top visited URL, then A will be in
312 // the vector and "A => {B -> C}" will be in the map. 313 // the vector and "A => {B -> C}" will be in the map.
313 typedef base::Callback< 314 typedef base::Callback<
314 void(Handle, 315 void(Handle,
315 bool, // Did we get the top urls and redirects? 316 bool, // Did we get the top urls and redirects?
316 std::vector<GURL>*, // List of top URLs. 317 std::vector<GURL>*, // List of top URLs.
(...skipping 715 matching lines...) Expand 10 before | Expand all | Expand 10 after
1032 scoped_ptr<history::InMemoryURLIndex> in_memory_url_index_; 1033 scoped_ptr<history::InMemoryURLIndex> in_memory_url_index_;
1033 1034
1034 ObserverList<history::VisitDatabaseObserver> visit_database_observers_; 1035 ObserverList<history::VisitDatabaseObserver> visit_database_observers_;
1035 1036
1036 history::DeleteDirectiveHandler delete_directive_handler_; 1037 history::DeleteDirectiveHandler delete_directive_handler_;
1037 1038
1038 DISALLOW_COPY_AND_ASSIGN(HistoryService); 1039 DISALLOW_COPY_AND_ASSIGN(HistoryService);
1039 }; 1040 };
1040 1041
1041 #endif // CHROME_BROWSER_HISTORY_HISTORY_SERVICE_H_ 1042 #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