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

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

Issue 722953002: downloads: add the ability to undo download removal. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: dcheck Created 6 years, 1 month 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
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_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 7
8 #include <set> 8 #include <set>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 110
111 // AllDownloadItemNotifier::Observer 111 // AllDownloadItemNotifier::Observer
112 void OnDownloadCreated(content::DownloadManager* manager, 112 void OnDownloadCreated(content::DownloadManager* manager,
113 content::DownloadItem* item) override; 113 content::DownloadItem* item) override;
114 void OnDownloadUpdated(content::DownloadManager* manager, 114 void OnDownloadUpdated(content::DownloadManager* manager,
115 content::DownloadItem* item) override; 115 content::DownloadItem* item) override;
116 void OnDownloadOpened(content::DownloadManager* manager, 116 void OnDownloadOpened(content::DownloadManager* manager,
117 content::DownloadItem* item) override; 117 content::DownloadItem* item) override;
118 void OnDownloadRemoved(content::DownloadManager* manager, 118 void OnDownloadRemoved(content::DownloadManager* manager,
119 content::DownloadItem* item) override; 119 content::DownloadItem* item) override;
120 void OnDownloadRevived(content::DownloadManager* manager,
121 content::DownloadItem* item) override;
120 122
121 // Schedule a record to be removed from |history_| the next time 123 // Schedule a record to be removed from |history_| the next time
122 // RemoveDownloadsBatch() runs. Schedule RemoveDownloadsBatch() to be run soon 124 // RemoveDownloadsBatch() runs. Schedule RemoveDownloadsBatch() to be run soon
123 // if it isn't already scheduled. 125 // if it isn't already scheduled.
124 void ScheduleRemoveDownload(uint32 download_id); 126 void ScheduleRemoveDownload(uint32 download_id);
125 127
126 // Removes all |removing_ids_| from |history_|. 128 // Removes all |removing_ids_| from |history_|.
127 void RemoveDownloadsBatch(); 129 void RemoveDownloadsBatch();
128 130
129 AllDownloadItemNotifier notifier_; 131 AllDownloadItemNotifier notifier_;
(...skipping 19 matching lines...) Expand all
149 int64 history_size_; 151 int64 history_size_;
150 152
151 ObserverList<Observer> observers_; 153 ObserverList<Observer> observers_;
152 154
153 base::WeakPtrFactory<DownloadHistory> weak_ptr_factory_; 155 base::WeakPtrFactory<DownloadHistory> weak_ptr_factory_;
154 156
155 DISALLOW_COPY_AND_ASSIGN(DownloadHistory); 157 DISALLOW_COPY_AND_ASSIGN(DownloadHistory);
156 }; 158 };
157 159
158 #endif // CHROME_BROWSER_DOWNLOAD_DOWNLOAD_HISTORY_H_ 160 #endif // CHROME_BROWSER_DOWNLOAD_DOWNLOAD_HISTORY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698