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