| 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 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 272 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 283 const QueryRedirectsCallback& callback, | 283 const QueryRedirectsCallback& callback, |
| 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< | |
| 294 void(Handle, | |
| 295 bool, // Were we able to determine the # of visits? | |
| 296 int, // Number of visits. | |
| 297 base::Time)> // Time of first visit. Only set if bool | |
| 298 // is true and int is > 0. | |
| 299 GetVisibleVisitCountToHostCallback; | |
| 300 | |
| 301 // Requests the number of user-visible visits (i.e. no redirects or subframes) | 293 // Requests the number of user-visible visits (i.e. no redirects or subframes) |
| 302 // to all urls on the same scheme/host/port as |url|. This is only valid for | 294 // to all urls on the same scheme/host/port as |url|. This is only valid for |
| 303 // HTTP and HTTPS URLs. | 295 // HTTP and HTTPS URLs. |
| 304 Handle GetVisibleVisitCountToHost( | 296 typedef base::Callback< |
| 297 void(bool, // Were we able to determine the # of visits? |
| 298 int, // Number of visits. |
| 299 base::Time)> // Time of first visit. Only set if bool |
| 300 // is true and int is > 0. |
| 301 GetVisibleVisitCountToHostCallback; |
| 302 |
| 303 base::CancelableTaskTracker::TaskId GetVisibleVisitCountToHost( |
| 305 const GURL& url, | 304 const GURL& url, |
| 306 CancelableRequestConsumerBase* consumer, | 305 const GetVisibleVisitCountToHostCallback& callback, |
| 307 const GetVisibleVisitCountToHostCallback& callback); | 306 base::CancelableTaskTracker* tracker); |
| 308 | 307 |
| 309 // Request the |result_count| most visited URLs and the chain of | 308 // Request the |result_count| most visited URLs and the chain of |
| 310 // redirects leading to each of these URLs. |days_back| is the | 309 // redirects leading to each of these URLs. |days_back| is the |
| 311 // number of days of history to use. Used by TopSites. | 310 // number of days of history to use. Used by TopSites. |
| 312 typedef base::Callback<void(const history::MostVisitedURLList*)> | 311 typedef base::Callback<void(const history::MostVisitedURLList*)> |
| 313 QueryMostVisitedURLsCallback; | 312 QueryMostVisitedURLsCallback; |
| 314 | 313 |
| 315 base::CancelableTaskTracker::TaskId QueryMostVisitedURLs( | 314 base::CancelableTaskTracker::TaskId QueryMostVisitedURLs( |
| 316 int result_count, | 315 int result_count, |
| 317 int days_back, | 316 int days_back, |
| (...skipping 659 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 977 scoped_ptr<history::InMemoryURLIndex> in_memory_url_index_; | 976 scoped_ptr<history::InMemoryURLIndex> in_memory_url_index_; |
| 978 | 977 |
| 979 ObserverList<history::VisitDatabaseObserver> visit_database_observers_; | 978 ObserverList<history::VisitDatabaseObserver> visit_database_observers_; |
| 980 | 979 |
| 981 history::DeleteDirectiveHandler delete_directive_handler_; | 980 history::DeleteDirectiveHandler delete_directive_handler_; |
| 982 | 981 |
| 983 DISALLOW_COPY_AND_ASSIGN(HistoryService); | 982 DISALLOW_COPY_AND_ASSIGN(HistoryService); |
| 984 }; | 983 }; |
| 985 | 984 |
| 986 #endif // CHROME_BROWSER_HISTORY_HISTORY_SERVICE_H_ | 985 #endif // CHROME_BROWSER_HISTORY_HISTORY_SERVICE_H_ |
| OLD | NEW |