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 405 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
416 DownloadCreateCallback; | 416 DownloadCreateCallback; |
417 | 417 |
418 // Begins a history request to create a new persistent entry for a download. | 418 // Begins a history request to create a new persistent entry for a download. |
419 // 'info' contains all the download's creation state, and 'callback' runs | 419 // 'info' contains all the download's creation state, and 'callback' runs |
420 // when the history service request is complete. | 420 // when the history service request is complete. |
421 Handle CreateDownload(int32 id, | 421 Handle CreateDownload(int32 id, |
422 const DownloadPersistentStoreInfo& info, | 422 const DownloadPersistentStoreInfo& info, |
423 CancelableRequestConsumerBase* consumer, | 423 CancelableRequestConsumerBase* consumer, |
424 DownloadCreateCallback* callback); | 424 DownloadCreateCallback* callback); |
425 | 425 |
426 // Implemented by the caller of 'GetNextDownloadId' below. | |
427 typedef Callback1<int/*next_download_id*/>::Type DownloadNextIdCallback; | |
428 | |
429 // Runs the callback with the next available download id. | |
430 Handle GetNextDownloadId(CancelableRequestConsumerBase* consumer, | |
431 DownloadNextIdCallback* callback); | |
432 | |
433 // Implemented by the caller of 'QueryDownloads' below, and is called when the | 426 // Implemented by the caller of 'QueryDownloads' below, and is called when the |
434 // history service has retrieved a list of all download state. The call | 427 // history service has retrieved a list of all download state. The call |
435 typedef Callback1<std::vector<DownloadPersistentStoreInfo>*>::Type | 428 typedef Callback1<std::vector<DownloadPersistentStoreInfo>*>::Type |
436 DownloadQueryCallback; | 429 DownloadQueryCallback; |
437 | 430 |
438 // Begins a history request to retrieve the state of all downloads in the | 431 // Begins a history request to retrieve the state of all downloads in the |
439 // history db. 'callback' runs when the history service request is complete, | 432 // history db. 'callback' runs when the history service request is complete, |
440 // at which point 'info' contains an array of DownloadPersistentStoreInfo, one | 433 // at which point 'info' contains an array of DownloadPersistentStoreInfo, one |
441 // per download. | 434 // per download. |
442 Handle QueryDownloads(CancelableRequestConsumerBase* consumer, | 435 Handle QueryDownloads(CancelableRequestConsumerBase* consumer, |
(...skipping 431 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
874 BookmarkService* bookmark_service_; | 867 BookmarkService* bookmark_service_; |
875 bool no_db_; | 868 bool no_db_; |
876 | 869 |
877 // True if needs top site migration. | 870 // True if needs top site migration. |
878 bool needs_top_sites_migration_; | 871 bool needs_top_sites_migration_; |
879 | 872 |
880 DISALLOW_COPY_AND_ASSIGN(HistoryService); | 873 DISALLOW_COPY_AND_ASSIGN(HistoryService); |
881 }; | 874 }; |
882 | 875 |
883 #endif // CHROME_BROWSER_HISTORY_HISTORY_H_ | 876 #endif // CHROME_BROWSER_HISTORY_HISTORY_H_ |
OLD | NEW |