summaryrefslogtreecommitdiffstats
path: root/chrome/browser/download/download_request_limiter.h
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser/download/download_request_limiter.h')
-rw-r--r--chrome/browser/download/download_request_limiter.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/chrome/browser/download/download_request_limiter.h b/chrome/browser/download/download_request_limiter.h
index 16ebfaf..05b3b73 100644
--- a/chrome/browser/download/download_request_limiter.h
+++ b/chrome/browser/download/download_request_limiter.h
@@ -218,6 +218,14 @@ class DownloadRequestLimiter
const std::string& request_method,
const Callback& callback);
+ // Invoked when decision to download has been made.
+ void OnCanDownloadDecided(int render_process_host_id,
+ int render_view_id,
+ int request_id,
+ const std::string& request_method,
+ 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);
@@ -234,6 +242,10 @@ class DownloadRequestLimiter
typedef std::map<content::WebContents*, TabDownloadState*> StateMap;
StateMap state_map_;
+ // Weak ptr factory used when |CanDownload| asks the delegate asynchronously
+ // about the download.
+ base::WeakPtrFactory<DownloadRequestLimiter> factory_;
+
DISALLOW_COPY_AND_ASSIGN(DownloadRequestLimiter);
};