| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_H_ | 5 #ifndef CHROME_BROWSER_HISTORY_HISTORY_H_ |
| 6 #define CHROME_BROWSER_HISTORY_HISTORY_H_ | 6 #define CHROME_BROWSER_HISTORY_HISTORY_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <set> | 9 #include <set> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 312 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 323 | 323 |
| 324 // Schedules a query to get the most recent redirects ending at the given | 324 // Schedules a query to get the most recent redirects ending at the given |
| 325 // URL. | 325 // URL. |
| 326 Handle QueryRedirectsTo(const GURL& to_url, | 326 Handle QueryRedirectsTo(const GURL& to_url, |
| 327 CancelableRequestConsumerBase* consumer, | 327 CancelableRequestConsumerBase* consumer, |
| 328 QueryRedirectsCallback* callback); | 328 QueryRedirectsCallback* callback); |
| 329 | 329 |
| 330 typedef Callback4<Handle, | 330 typedef Callback4<Handle, |
| 331 bool, // Were we able to determine the # of visits? | 331 bool, // Were we able to determine the # of visits? |
| 332 int, // Number of visits. | 332 int, // Number of visits. |
| 333 base::Time>::Type // Time of first visit. Only first bool | 333 base::Time>::Type // Time of first visit. Only set if bool |
| 334 // is true and int is > 0. | 334 // is true and int is > 0. |
| 335 GetVisitCountToHostCallback; | 335 GetVisibleVisitCountToHostCallback; |
| 336 | 336 |
| 337 // Requests the number of visits to all urls on the scheme/host/post | 337 // Requests the number of user-visible visits (i.e. no redirects or subframes) |
| 338 // identified by url. This is only valid for http and https urls. | 338 // to all urls on the same scheme/host/port as |url|. This is only valid for |
| 339 Handle GetVisitCountToHost(const GURL& url, | 339 // HTTP and HTTPS URLs. |
| 340 CancelableRequestConsumerBase* consumer, | 340 Handle GetVisibleVisitCountToHost( |
| 341 GetVisitCountToHostCallback* callback); | 341 const GURL& url, |
| 342 CancelableRequestConsumerBase* consumer, |
| 343 GetVisibleVisitCountToHostCallback* callback); |
| 342 | 344 |
| 343 // Called when QueryTopURLsAndRedirects completes. The vector contains a list | 345 // Called when QueryTopURLsAndRedirects completes. The vector contains a list |
| 344 // of the top |result_count| URLs. For each of these URLs, there is an entry | 346 // of the top |result_count| URLs. For each of these URLs, there is an entry |
| 345 // in the map containing redirects from the URL. For example, if we have the | 347 // in the map containing redirects from the URL. For example, if we have the |
| 346 // redirect chain A -> B -> C and A is a top visited URL, then A will be in | 348 // redirect chain A -> B -> C and A is a top visited URL, then A will be in |
| 347 // the vector and "A => {B -> C}" will be in the map. | 349 // the vector and "A => {B -> C}" will be in the map. |
| 348 typedef Callback4<Handle, | 350 typedef Callback4<Handle, |
| 349 bool, // Did we get the top urls and redirects? | 351 bool, // Did we get the top urls and redirects? |
| 350 std::vector<GURL>*, // List of top URLs. | 352 std::vector<GURL>*, // List of top URLs. |
| 351 history::RedirectMap*>::Type // Redirects for top URLs. | 353 history::RedirectMap*>::Type // Redirects for top URLs. |
| (...skipping 515 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 867 BookmarkService* bookmark_service_; | 869 BookmarkService* bookmark_service_; |
| 868 bool no_db_; | 870 bool no_db_; |
| 869 | 871 |
| 870 // True if needs top site migration. | 872 // True if needs top site migration. |
| 871 bool needs_top_sites_migration_; | 873 bool needs_top_sites_migration_; |
| 872 | 874 |
| 873 DISALLOW_COPY_AND_ASSIGN(HistoryService); | 875 DISALLOW_COPY_AND_ASSIGN(HistoryService); |
| 874 }; | 876 }; |
| 875 | 877 |
| 876 #endif // CHROME_BROWSER_HISTORY_HISTORY_H_ | 878 #endif // CHROME_BROWSER_HISTORY_HISTORY_H_ |
| OLD | NEW |