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

Side by Side Diff: chrome/browser/download/download_history.h

Issue 7796014: Make cancel remove cancelled download from active queues at time of cancel. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix to try to get past main waterfall failure. Created 9 years, 3 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) 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_DOWNLOAD_DOWNLOAD_HISTORY_H_ 5 #ifndef CHROME_BROWSER_DOWNLOAD_DOWNLOAD_HISTORY_H_
6 #define CHROME_BROWSER_DOWNLOAD_DOWNLOAD_HISTORY_H_ 6 #define CHROME_BROWSER_DOWNLOAD_DOWNLOAD_HISTORY_H_
7 #pragma once 7 #pragma once
8 8
9 #include <map> 9 #include <map>
10 10
(...skipping 29 matching lines...) Expand all
40 void AddEntry(DownloadItem* download_item, 40 void AddEntry(DownloadItem* download_item,
41 HistoryService::DownloadCreateCallback* callback); 41 HistoryService::DownloadCreateCallback* callback);
42 42
43 // Updates the history entry for |download_item|. 43 // Updates the history entry for |download_item|.
44 void UpdateEntry(DownloadItem* download_item); 44 void UpdateEntry(DownloadItem* download_item);
45 45
46 // Updates the download path for |download_item| to |new_path|. 46 // Updates the download path for |download_item| to |new_path|.
47 void UpdateDownloadPath(DownloadItem* download_item, 47 void UpdateDownloadPath(DownloadItem* download_item,
48 const FilePath& new_path); 48 const FilePath& new_path);
49 49
50 // Removes |download_item| from the history database. 50 // Removes the download identified by |db_handle| from the history database.
51 void RemoveEntry(DownloadItem* download_item); 51 // |db_handle| is used instead of the DownloadItem pointer to allow
52 // removal after deletion of the download item.
53 void RemoveEntry(int64 db_handle);
52 54
53 // Removes download-related history entries in the given time range. 55 // Removes download-related history entries in the given time range.
54 void RemoveEntriesBetween(const base::Time remove_begin, 56 void RemoveEntriesBetween(const base::Time remove_begin,
55 const base::Time remove_end); 57 const base::Time remove_end);
56 58
57 // Returns a new unique database handle which will not collide with real ones. 59 // Returns a new unique database handle which will not collide with real ones.
58 int64 GetNextFakeDbHandle(); 60 int64 GetNextFakeDbHandle();
59 61
60 private: 62 private:
61 typedef std::map<HistoryService::Handle, 63 typedef std::map<HistoryService::Handle,
(...skipping 15 matching lines...) Expand all
77 79
78 CancelableRequestConsumer history_consumer_; 80 CancelableRequestConsumer history_consumer_;
79 81
80 // The outstanding requests made by CheckVisitedReferrerBefore(). 82 // The outstanding requests made by CheckVisitedReferrerBefore().
81 VisitedBeforeRequestsMap visited_before_requests_; 83 VisitedBeforeRequestsMap visited_before_requests_;
82 84
83 DISALLOW_COPY_AND_ASSIGN(DownloadHistory); 85 DISALLOW_COPY_AND_ASSIGN(DownloadHistory);
84 }; 86 };
85 87
86 #endif // CHROME_BROWSER_DOWNLOAD_DOWNLOAD_HISTORY_H_ 88 #endif // CHROME_BROWSER_DOWNLOAD_DOWNLOAD_HISTORY_H_
OLDNEW
« no previous file with comments | « chrome/browser/download/download_browsertest.cc ('k') | chrome/browser/download/download_history.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698