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 431 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
442 Handle QueryDownloads(CancelableRequestConsumerBase* consumer, | 442 Handle QueryDownloads(CancelableRequestConsumerBase* consumer, |
443 DownloadQueryCallback* callback); | 443 DownloadQueryCallback* callback); |
444 | 444 |
445 // Begins a request to clean up entries that has been corrupted (because of | 445 // Begins a request to clean up entries that has been corrupted (because of |
446 // the crash, for example). | 446 // the crash, for example). |
447 void CleanUpInProgressEntries(); | 447 void CleanUpInProgressEntries(); |
448 | 448 |
449 // Called to update the history service about the current state of a download. | 449 // Called to update the history service about the current state of a download. |
450 // This is a 'fire and forget' query, so just pass the relevant state info to | 450 // This is a 'fire and forget' query, so just pass the relevant state info to |
451 // the database with no need for a callback. | 451 // the database with no need for a callback. |
452 void UpdateDownload(int64 received_bytes, int32 state, int64 db_handle); | 452 void UpdateDownload(int64 received_bytes, |
| 453 int32 state, |
| 454 const base::Time& end_time, |
| 455 int64 db_handle); |
453 | 456 |
454 // Called to update the history service about the path of a download. | 457 // Called to update the history service about the path of a download. |
455 // This is a 'fire and forget' query. | 458 // This is a 'fire and forget' query. |
456 void UpdateDownloadPath(const FilePath& path, int64 db_handle); | 459 void UpdateDownloadPath(const FilePath& path, int64 db_handle); |
457 | 460 |
458 // Permanently remove a download from the history system. This is a 'fire and | 461 // Permanently remove a download from the history system. This is a 'fire and |
459 // forget' operation. | 462 // forget' operation. |
460 void RemoveDownload(int64 db_handle); | 463 void RemoveDownload(int64 db_handle); |
461 | 464 |
462 // Permanently removes all completed download from the history system within | 465 // Permanently removes all completed download from the history system within |
463 // the specified range. This function does not delete downloads that are in | 466 // the specified range. This function does not delete downloads that are in |
464 // progress or in the process of being cancelled. This is a 'fire and forget' | 467 // progress or in the process of being cancelled. This is a 'fire and forget' |
465 // operation. You can pass is_null times to get unbounded time in either or | 468 // operation. You can pass is_null times to get unbounded time in either or |
466 // both directions. | 469 // both directions. |
467 void RemoveDownloadsBetween(base::Time remove_begin, base::Time remove_end); | 470 void RemoveDownloadsBetween(base::Time remove_begin, base::Time remove_end); |
468 | 471 |
| 472 // Sets the download record |opened| flag. |
| 473 void MarkDownloadOpened(int64 db_handle); |
| 474 |
469 // Visit Segments ------------------------------------------------------------ | 475 // Visit Segments ------------------------------------------------------------ |
470 | 476 |
471 typedef Callback2<Handle, std::vector<PageUsageData*>*>::Type | 477 typedef Callback2<Handle, std::vector<PageUsageData*>*>::Type |
472 SegmentQueryCallback; | 478 SegmentQueryCallback; |
473 | 479 |
474 // Query usage data for all visit segments since the provided time. | 480 // Query usage data for all visit segments since the provided time. |
475 // | 481 // |
476 // The request is performed asynchronously and can be cancelled by using the | 482 // The request is performed asynchronously and can be cancelled by using the |
477 // returned handle. | 483 // returned handle. |
478 // | 484 // |
(...skipping 400 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
879 BookmarkService* bookmark_service_; | 885 BookmarkService* bookmark_service_; |
880 bool no_db_; | 886 bool no_db_; |
881 | 887 |
882 // True if needs top site migration. | 888 // True if needs top site migration. |
883 bool needs_top_sites_migration_; | 889 bool needs_top_sites_migration_; |
884 | 890 |
885 DISALLOW_COPY_AND_ASSIGN(HistoryService); | 891 DISALLOW_COPY_AND_ASSIGN(HistoryService); |
886 }; | 892 }; |
887 | 893 |
888 #endif // CHROME_BROWSER_HISTORY_HISTORY_H_ | 894 #endif // CHROME_BROWSER_HISTORY_HISTORY_H_ |
OLD | NEW |