Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(382)

Side by Side Diff: chrome/browser/history/history_service.h

Issue 13044019: Clean up entries left by crashes in the DownloadDB. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Shift cleanup to DownloadDatabase. Created 7 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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_SERVICE_H_ 5 #ifndef CHROME_BROWSER_HISTORY_HISTORY_SERVICE_H_
6 #define CHROME_BROWSER_HISTORY_HISTORY_SERVICE_H_ 6 #define CHROME_BROWSER_HISTORY_HISTORY_SERVICE_H_
7 7
8 #include <set> 8 #include <set>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 446 matching lines...) Expand 10 before | Expand all | Expand 10 after
457 typedef base::Callback<void( 457 typedef base::Callback<void(
458 scoped_ptr<std::vector<history::DownloadRow> >)> 458 scoped_ptr<std::vector<history::DownloadRow> >)>
459 DownloadQueryCallback; 459 DownloadQueryCallback;
460 460
461 // Begins a history request to retrieve the state of all downloads in the 461 // Begins a history request to retrieve the state of all downloads in the
462 // history db. 'callback' runs when the history service request is complete, 462 // history db. 'callback' runs when the history service request is complete,
463 // at which point 'info' contains an array of history::DownloadRow, one per 463 // at which point 'info' contains an array of history::DownloadRow, one per
464 // download. The callback is called on the thread that calls QueryDownloads(). 464 // download. The callback is called on the thread that calls QueryDownloads().
465 void QueryDownloads(const DownloadQueryCallback& callback); 465 void QueryDownloads(const DownloadQueryCallback& callback);
466 466
467 // Begins a request to clean up entries that has been corrupted (because of
468 // the crash, for example).
469 void CleanUpInProgressEntries();
470
471 // Called to update the history service about the current state of a download. 467 // Called to update the history service about the current state of a download.
472 // This is a 'fire and forget' query, so just pass the relevant state info to 468 // This is a 'fire and forget' query, so just pass the relevant state info to
473 // the database with no need for a callback. 469 // the database with no need for a callback.
474 void UpdateDownload(const history::DownloadRow& data); 470 void UpdateDownload(const history::DownloadRow& data);
475 471
476 // Permanently remove some downloads from the history system. This is a 'fire 472 // Permanently remove some downloads from the history system. This is a 'fire
477 // and forget' operation. 473 // and forget' operation.
478 void RemoveDownloads(const std::set<int64>& db_handles); 474 void RemoveDownloads(const std::set<int64>& db_handles);
479 475
480 // Visit Segments ------------------------------------------------------------ 476 // Visit Segments ------------------------------------------------------------
(...skipping 609 matching lines...) Expand 10 before | Expand all | Expand 10 after
1090 scoped_ptr<history::InMemoryURLIndex> in_memory_url_index_; 1086 scoped_ptr<history::InMemoryURLIndex> in_memory_url_index_;
1091 1087
1092 ObserverList<history::VisitDatabaseObserver> visit_database_observers_; 1088 ObserverList<history::VisitDatabaseObserver> visit_database_observers_;
1093 1089
1094 history::DeleteDirectiveHandler delete_directive_handler_; 1090 history::DeleteDirectiveHandler delete_directive_handler_;
1095 1091
1096 DISALLOW_COPY_AND_ASSIGN(HistoryService); 1092 DISALLOW_COPY_AND_ASSIGN(HistoryService);
1097 }; 1093 };
1098 1094
1099 #endif // CHROME_BROWSER_HISTORY_HISTORY_SERVICE_H_ 1095 #endif // CHROME_BROWSER_HISTORY_HISTORY_SERVICE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698