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, history::FilteredURLList)> | |
374 QueryFilteredURLsCallback; | |
GeorgeY
2012/04/19 01:16:24
As long as we adding a new one - could we make it
Rune Fevang
2012/04/25 00:52:45
Done.
| |
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<RefCountedBytes>)> | 398 typedef base::Callback<void(Handle, scoped_refptr<RefCountedBytes>)> |
(...skipping 501 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
897 // True if needs top site migration. | 900 // True if needs top site migration. |
898 bool needs_top_sites_migration_; | 901 bool needs_top_sites_migration_; |
899 | 902 |
900 // The index used for quick history lookups. | 903 // The index used for quick history lookups. |
901 scoped_ptr<history::InMemoryURLIndex> in_memory_url_index_; | 904 scoped_ptr<history::InMemoryURLIndex> in_memory_url_index_; |
902 | 905 |
903 DISALLOW_COPY_AND_ASSIGN(HistoryService); | 906 DISALLOW_COPY_AND_ASSIGN(HistoryService); |
904 }; | 907 }; |
905 | 908 |
906 #endif // CHROME_BROWSER_HISTORY_HISTORY_H_ | 909 #endif // CHROME_BROWSER_HISTORY_HISTORY_H_ |
OLD | NEW |