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

Unified Diff: chrome/browser/download/download_request_limiter.h

Issue 1229933010: move file access permission logic to DownloadResourceThrottle (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: addressing comments 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: chrome/browser/download/download_request_limiter.h
diff --git a/chrome/browser/download/download_request_limiter.h b/chrome/browser/download/download_request_limiter.h
index 57a66bc93a0058f23ceea3550158122c9e5b3c32..e086f254539e8d89e9fb67878c1d19990890a91d 100644
--- a/chrome/browser/download/download_request_limiter.h
+++ b/chrome/browser/download/download_request_limiter.h
@@ -181,13 +181,12 @@ class DownloadRequestLimiter
// anyway.
DownloadStatus GetDownloadStatus(content::WebContents* tab);
- // Updates the state of the page as necessary and notifies the callback.
- // WARNING: both this call and the callback are invoked on the io thread.
- void CanDownloadOnIOThread(int render_process_host_id,
- int render_view_id,
- const GURL& url,
- const std::string& request_method,
- const Callback& callback);
+ // Check if download can proceed and notifies the callback on UI thread.
+ void CanDownload(int render_process_host_id,
+ int render_view_id,
+ const GURL& url,
+ const std::string& request_method,
+ const Callback& callback);
private:
FRIEND_TEST_ALL_PREFIXES(DownloadTest, DownloadResourceThrottleCancels);
@@ -209,14 +208,6 @@ class DownloadRequestLimiter
content::WebContents* originating_web_contents,
bool create);
- // CanDownloadOnIOThread invokes this on the UI thread. This determines the
- // tab and invokes CanDownloadImpl.
- void CanDownload(int render_process_host_id,
- int render_view_id,
- const GURL& url,
- const std::string& request_method,
- const Callback& callback);
-
// Does the work of updating the download status on the UI thread and
// potentially prompting the user.
void CanDownloadImpl(content::WebContents* originating_contents,
@@ -230,10 +221,6 @@ class DownloadRequestLimiter
const Callback& orig_callback,
bool allow);
- // Invoked on the UI thread. Schedules a call to NotifyCallback on the io
- // thread.
- void ScheduleNotification(const Callback& callback, bool allow);
-
// Removes the specified TabDownloadState from the internal map and deletes
// it. This has the effect of resetting the status for the tab to
// ALLOW_ONE_DOWNLOAD.

Powered by Google App Engine
This is Rietveld 408576698