| 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_BACKEND_H_ | 5 #ifndef CHROME_BROWSER_HISTORY_HISTORY_BACKEND_H_ |
| 6 #define CHROME_BROWSER_HISTORY_HISTORY_BACKEND_H_ | 6 #define CHROME_BROWSER_HISTORY_HISTORY_BACKEND_H_ |
| 7 | 7 |
| 8 #include <set> | 8 #include <set> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <utility> | 10 #include <utility> |
| (...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 157 QueryResults* query_results); | 157 QueryResults* query_results); |
| 158 void QueryRedirectsFrom(const GURL& url, QueryRedirectsResult* result); | 158 void QueryRedirectsFrom(const GURL& url, QueryRedirectsResult* result); |
| 159 void QueryRedirectsTo(const GURL& url, QueryRedirectsResult* result); | 159 void QueryRedirectsTo(const GURL& url, QueryRedirectsResult* result); |
| 160 | 160 |
| 161 void GetVisibleVisitCountToHost(const GURL& url, | 161 void GetVisibleVisitCountToHost(const GURL& url, |
| 162 VisibleVisitCountToHostResult* result); | 162 VisibleVisitCountToHostResult* result); |
| 163 | 163 |
| 164 // Request the |result_count| most visited URLs and the chain of | 164 // Request the |result_count| most visited URLs and the chain of |
| 165 // redirects leading to each of these URLs. |days_back| is the | 165 // redirects leading to each of these URLs. |days_back| is the |
| 166 // number of days of history to use. Used by TopSites. | 166 // number of days of history to use. Used by TopSites. |
| 167 void QueryMostVisitedURLs( | 167 void QueryMostVisitedURLs(int result_count, |
| 168 scoped_refptr<QueryMostVisitedURLsRequest> request, | 168 int days_back, |
| 169 int result_count, | 169 MostVisitedURLList* result); |
| 170 int days_back); | |
| 171 | 170 |
| 172 // Request the |result_count| URLs and the chain of redirects | 171 // Request the |result_count| URLs and the chain of redirects |
| 173 // leading to each of these URLs, filterd and sorted based on the |filter|. | 172 // leading to each of these URLs, filterd and sorted based on the |filter|. |
| 174 // If |debug| is enabled, additional data will be computed and provided. | 173 // If |debug| is enabled, additional data will be computed and provided. |
| 175 void QueryFilteredURLs( | 174 void QueryFilteredURLs( |
| 176 scoped_refptr<QueryFilteredURLsRequest> request, | 175 scoped_refptr<QueryFilteredURLsRequest> request, |
| 177 int result_count, | 176 int result_count, |
| 178 const history::VisitFilter& filter, | 177 const history::VisitFilter& filter, |
| 179 bool debug); | 178 bool debug); |
| 180 | 179 |
| 181 // QueryMostVisitedURLs without the request. | |
| 182 void QueryMostVisitedURLsImpl(int result_count, | |
| 183 int days_back, | |
| 184 MostVisitedURLList* result); | |
| 185 | |
| 186 // Computes the most recent URL(s) that the given canonical URL has | 180 // Computes the most recent URL(s) that the given canonical URL has |
| 187 // redirected to and returns true on success. There may be more than one | 181 // redirected to and returns true on success. There may be more than one |
| 188 // redirect in a row, so this function will fill the given array with the | 182 // redirect in a row, so this function will fill the given array with the |
| 189 // entire chain. If there are no redirects for the most recent visit of the | 183 // entire chain. If there are no redirects for the most recent visit of the |
| 190 // URL, or the URL is not in history, returns false. | 184 // URL, or the URL is not in history, returns false. |
| 191 // | 185 // |
| 192 // Backend for QueryRedirectsFrom. | 186 // Backend for QueryRedirectsFrom. |
| 193 bool GetMostRecentRedirectsFrom(const GURL& url, | 187 bool GetMostRecentRedirectsFrom(const GURL& url, |
| 194 history::RedirectList* redirects); | 188 history::RedirectList* redirects); |
| 195 | 189 |
| (...skipping 661 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 857 | 851 |
| 858 // Listens for the system being under memory pressure. | 852 // Listens for the system being under memory pressure. |
| 859 scoped_ptr<base::MemoryPressureListener> memory_pressure_listener_; | 853 scoped_ptr<base::MemoryPressureListener> memory_pressure_listener_; |
| 860 | 854 |
| 861 DISALLOW_COPY_AND_ASSIGN(HistoryBackend); | 855 DISALLOW_COPY_AND_ASSIGN(HistoryBackend); |
| 862 }; | 856 }; |
| 863 | 857 |
| 864 } // namespace history | 858 } // namespace history |
| 865 | 859 |
| 866 #endif // CHROME_BROWSER_HISTORY_HISTORY_BACKEND_H_ | 860 #endif // CHROME_BROWSER_HISTORY_HISTORY_BACKEND_H_ |
| OLD | NEW |