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

Unified Diff: content/browser/download/download_manager_impl.h

Issue 1251243003: Support restricting browsing data removal for downloads by origin. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@lkgr
Patch Set: Created 5 years, 5 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 side-by-side diff with in-line comments
Download patch
Index: content/browser/download/download_manager_impl.h
diff --git a/content/browser/download/download_manager_impl.h b/content/browser/download/download_manager_impl.h
index 9c9d12deec392ed29fd7bfc6de1bf0d674214022..281db7d1929f11646ac045a31e44fc583911b70d 100644
--- a/content/browser/download/download_manager_impl.h
+++ b/content/browser/download/download_manager_impl.h
@@ -66,7 +66,8 @@ class CONTENT_EXPORT DownloadManagerImpl : public DownloadManager,
scoped_ptr<DownloadCreateInfo> info,
scoped_ptr<ByteStreamReader> stream,
const DownloadUrlParameters::OnStartedCallback& on_started) override;
- int RemoveDownloadsBetween(base::Time remove_begin,
+ int RemoveDownloadsBetween(const std::set<GURL>& restricted_urls,
Mike West 2015/07/22 20:16:03 Rename here as well (and I still don't understand
Timo Reimann 2015/07/23 23:11:07 Renamed and replaced the set by Origin.
+ base::Time remove_begin,
base::Time remove_end) override;
int RemoveDownloads(base::Time remove_begin) override;
int RemoveAllDownloads() override;
@@ -142,6 +143,11 @@ class CONTENT_EXPORT DownloadManagerImpl : public DownloadManager,
// observer.
void OnFileExistenceChecked(uint32 download_id, bool result);
+ // Determines if the given URL is among the set of restricted URLs. This is
+ // required for origin-specific removal of downloads.
+ bool IsRestrictedUrl(const GURL& url,
Mike West 2015/07/22 20:16:03 1. You can move this to an static function in an a
Timo Reimann 2015/07/22 23:22:15 Done.
Timo Reimann 2015/07/23 23:11:07 Renamed and reimplemented the method. I use the un
Mike West 2015/07/24 06:56:39 This worries me a bit; we eventually want to build
+ const std::set<GURL>& restricted_urls);
+
// Overridden from DownloadItemImplDelegate
// (Note that |GetBrowserContext| are present in both interfaces.)
void DetermineDownloadTarget(DownloadItemImpl* item,

Powered by Google App Engine
This is Rietveld 408576698