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

Side by Side Diff: chrome/browser/ui/webui/md_downloads/md_downloads_dom_handler.h

Issue 1610483003: MD Downloads: check for removed files on page load (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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
« no previous file with comments | « no previous file | chrome/browser/ui/webui/md_downloads/md_downloads_dom_handler.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_UI_WEBUI_MD_DOWNLOADS_MD_DOWNLOADS_DOM_HANDLER_H_ 5 #ifndef CHROME_BROWSER_UI_WEBUI_MD_DOWNLOADS_MD_DOWNLOADS_DOM_HANDLER_H_
6 #define CHROME_BROWSER_UI_WEBUI_MD_DOWNLOADS_MD_DOWNLOADS_DOM_HANDLER_H_ 6 #define CHROME_BROWSER_UI_WEBUI_MD_DOWNLOADS_MD_DOWNLOADS_DOM_HANDLER_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <set> 10 #include <set>
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 123
124 // Returns the download that is referred to in a given value. 124 // Returns the download that is referred to in a given value.
125 content::DownloadItem* GetDownloadByValue(const base::ListValue* args); 125 content::DownloadItem* GetDownloadByValue(const base::ListValue* args);
126 126
127 // Returns the download with |id| or NULL if it doesn't exist. 127 // Returns the download with |id| or NULL if it doesn't exist.
128 content::DownloadItem* GetDownloadById(uint32_t id); 128 content::DownloadItem* GetDownloadById(uint32_t id);
129 129
130 // Remove all downloads in |to_remove| with the ability to undo removal later. 130 // Remove all downloads in |to_remove| with the ability to undo removal later.
131 void RemoveDownloads(const DownloadVector& to_remove); 131 void RemoveDownloads(const DownloadVector& to_remove);
132 132
133 // Checks whether a download's file was removed from its original location.
134 void CheckForRemovedFiles();
135
133 DownloadsListTracker list_tracker_; 136 DownloadsListTracker list_tracker_;
134 137
135 // IDs of downloads to remove when this handler gets deleted. 138 // IDs of downloads to remove when this handler gets deleted.
136 std::vector<IdSet> removals_; 139 std::vector<IdSet> removals_;
137 140
138 base::WeakPtrFactory<MdDownloadsDOMHandler> weak_ptr_factory_; 141 base::WeakPtrFactory<MdDownloadsDOMHandler> weak_ptr_factory_;
139 142
140 DISALLOW_COPY_AND_ASSIGN(MdDownloadsDOMHandler); 143 DISALLOW_COPY_AND_ASSIGN(MdDownloadsDOMHandler);
141 }; 144 };
142 145
143 #endif // CHROME_BROWSER_UI_WEBUI_MD_DOWNLOADS_MD_DOWNLOADS_DOM_HANDLER_H_ 146 #endif // CHROME_BROWSER_UI_WEBUI_MD_DOWNLOADS_MD_DOWNLOADS_DOM_HANDLER_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/webui/md_downloads/md_downloads_dom_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698