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

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: Fix PostTask and tests. 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..dae0506e9e06f27462d23ce2e52465ce2a79a1b1 100644
--- a/chrome/browser/download/download_request_limiter.h
+++ b/chrome/browser/download/download_request_limiter.h
@@ -218,6 +218,13 @@ class DownloadRequestLimiter
const std::string& request_method,
const Callback& callback);
+ // Invoked when decision to download has been made.
+ void OnCanDownloadDecided(content::WebContents* originating_web_contents,
+ 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 +241,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);
};

Powered by Google App Engine
This is Rietveld 408576698