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

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

Issue 13037003: permissionrequest API for guest Download. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Sync @tott Created 7 years, 9 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 16ebfaf36cbc2ec35e12585663d5b8f77e808c17..05b3b736db87b049c0eadd1e3714473de0fd24d8 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);
};
« no previous file with comments | « chrome/browser/android/chrome_web_contents_delegate_android.cc ('k') | chrome/browser/download/download_request_limiter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698