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_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 352 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
363 // leading to each of these URLs. | 363 // leading to each of these URLs. |
364 // TODO(Nik): remove this. Use QueryMostVisitedURLs instead. | 364 // TODO(Nik): remove this. Use QueryMostVisitedURLs instead. |
365 Handle QueryTopURLsAndRedirects( | 365 Handle QueryTopURLsAndRedirects( |
366 int result_count, | 366 int result_count, |
367 CancelableRequestConsumerBase* consumer, | 367 CancelableRequestConsumerBase* consumer, |
368 const QueryTopURLsAndRedirectsCallback& callback); | 368 const QueryTopURLsAndRedirectsCallback& callback); |
369 | 369 |
370 typedef base::Callback<void(Handle, history::MostVisitedURLList)> | 370 typedef base::Callback<void(Handle, history::MostVisitedURLList)> |
371 QueryMostVisitedURLsCallback; | 371 QueryMostVisitedURLsCallback; |
372 | 372 |
| 373 typedef base::Callback<void(Handle, const history::FilteredURLList&)> |
| 374 QueryFilteredURLsCallback; |
| 375 |
373 // Request the |result_count| most visited URLs and the chain of | 376 // Request the |result_count| most visited URLs and the chain of |
374 // redirects leading to each of these URLs. |days_back| is the | 377 // redirects leading to each of these URLs. |days_back| is the |
375 // number of days of history to use. Used by TopSites. | 378 // number of days of history to use. Used by TopSites. |
376 Handle QueryMostVisitedURLs(int result_count, int days_back, | 379 Handle QueryMostVisitedURLs(int result_count, int days_back, |
377 CancelableRequestConsumerBase* consumer, | 380 CancelableRequestConsumerBase* consumer, |
378 const QueryMostVisitedURLsCallback& callback); | 381 const QueryMostVisitedURLsCallback& callback); |
379 | 382 |
380 // Request the |result_count| URLs filtered and sorted based on the |filter|. | 383 // Request the |result_count| URLs filtered and sorted based on the |filter|. |
381 Handle QueryFilteredURLs( | 384 Handle QueryFilteredURLs( |
382 int result_count, | 385 int result_count, |
383 const history::VisitFilter& filter, | 386 const history::VisitFilter& filter, |
384 CancelableRequestConsumerBase* consumer, | 387 CancelableRequestConsumerBase* consumer, |
385 const QueryMostVisitedURLsCallback& callback); | 388 const QueryFilteredURLsCallback& callback); |
386 | 389 |
387 // Thumbnails ---------------------------------------------------------------- | 390 // Thumbnails ---------------------------------------------------------------- |
388 | 391 |
389 // Implemented by consumers to get thumbnail data. Called when a request for | 392 // Implemented by consumers to get thumbnail data. Called when a request for |
390 // the thumbnail data is complete. Once this callback is made, the request | 393 // the thumbnail data is complete. Once this callback is made, the request |
391 // will be completed and no other calls will be made for that handle. | 394 // will be completed and no other calls will be made for that handle. |
392 // | 395 // |
393 // This function will be called even on error conditions or if there is no | 396 // This function will be called even on error conditions or if there is no |
394 // thumbnail for that page. In these cases, the data pointer will be NULL. | 397 // thumbnail for that page. In these cases, the data pointer will be NULL. |
395 typedef base::Callback<void(Handle, scoped_refptr<base::RefCountedBytes>)> | 398 typedef base::Callback<void(Handle, scoped_refptr<base::RefCountedBytes>)> |
(...skipping 512 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
908 // The index used for quick history lookups. | 911 // The index used for quick history lookups. |
909 scoped_ptr<history::InMemoryURLIndex> in_memory_url_index_; | 912 scoped_ptr<history::InMemoryURLIndex> in_memory_url_index_; |
910 | 913 |
911 scoped_refptr<ObserverListThreadSafe<history::VisitDatabaseObserver> > | 914 scoped_refptr<ObserverListThreadSafe<history::VisitDatabaseObserver> > |
912 visit_database_observers_; | 915 visit_database_observers_; |
913 | 916 |
914 DISALLOW_COPY_AND_ASSIGN(HistoryService); | 917 DISALLOW_COPY_AND_ASSIGN(HistoryService); |
915 }; | 918 }; |
916 | 919 |
917 #endif // CHROME_BROWSER_HISTORY_HISTORY_H_ | 920 #endif // CHROME_BROWSER_HISTORY_HISTORY_H_ |
OLD | NEW |