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

Unified Diff: content/public/browser/download_manager.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: Fix DownloadManager dependency injection and GMock matcher. 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/public/browser/download_manager.h
diff --git a/content/public/browser/download_manager.h b/content/public/browser/download_manager.h
index 74cb77d6d4da6560517efca3dfff1fec8c1a8a39..e50bea2392bfbc5db4ace1e615031353c31c648c 100644
--- a/content/public/browser/download_manager.h
+++ b/content/public/browser/download_manager.h
@@ -44,6 +44,10 @@
class GURL;
+namespace url {
+class Origin;
+}
+
namespace content {
class BrowserContext;
@@ -110,10 +114,12 @@ class CONTENT_EXPORT DownloadManager : public base::SupportsUserData::Data {
scoped_ptr<ByteStreamReader> stream,
const DownloadUrlParameters::OnStartedCallback& on_started) = 0;
- // Remove downloads after remove_begin (inclusive) and before remove_end
- // (exclusive). You may pass in null Time values to do an unbounded delete
- // in either direction.
- virtual int RemoveDownloadsBetween(base::Time remove_begin,
+ // Remove downloads which are same-origin with the given origin, are after
+ // remove_begin (inclusive), and before remove_end (exclusive). You may pass
+ // in null Time values to do an unbounded delete in either direction. A
+ // unique origin causes all origins to be removed.
Randy Smith (Not in Mondays) 2015/08/03 19:09:30 I'm uncomfortable with using unique origins to ind
Timo Reimann 2015/08/03 20:09:32 Sounds legitimate; especially since mkwst raised s
+ virtual int RemoveDownloadsBetween(const url::Origin& origin_to_clear,
+ base::Time remove_begin,
base::Time remove_end) = 0;
// Remove downloads will delete all downloads that have a timestamp that is

Powered by Google App Engine
This is Rietveld 408576698