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

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

Issue 1467563002: Use ResourceRequestInfo::GetWebContents in DownloadRequestLimiter (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@web-contents-callback
Patch Set: Addressed davidben's comments Created 5 years 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_resource_throttle.h
diff --git a/chrome/browser/download/download_resource_throttle.h b/chrome/browser/download/download_resource_throttle.h
index 4218c6aab25fdeb30c1daf4ce3fa7f58bd8eedc2..4798679897adae20791c3e0f9c69a0551e9abc22 100644
--- a/chrome/browser/download/download_resource_throttle.h
+++ b/chrome/browser/download/download_resource_throttle.h
@@ -26,16 +26,15 @@ class DownloadResourceThrottle
struct DownloadRequestInfo {
DownloadRequestInfo(
scoped_refptr<DownloadRequestLimiter> limiter,
- int render_process_id,
- int render_view_id,
+ const content::ResourceRequestInfo::WebContentsGetter&
+ web_contents_getter,
const GURL& url,
const std::string& request_method,
const DownloadRequestLimiter::Callback& continue_callback);
~DownloadRequestInfo();
scoped_refptr<DownloadRequestLimiter> limiter;
- int render_process_id;
- int render_view_id;
+ content::ResourceRequestInfo::WebContentsGetter web_contents_getter;
GURL url;
std::string request_method;
DownloadRequestLimiter::Callback continue_callback;
@@ -43,11 +42,12 @@ class DownloadResourceThrottle
DISALLOW_COPY_AND_ASSIGN(DownloadRequestInfo);
};
- DownloadResourceThrottle(scoped_refptr<DownloadRequestLimiter> limiter,
- int render_process_id,
- int render_view_id,
- const GURL& url,
- const std::string& request_method);
+ DownloadResourceThrottle(
+ scoped_refptr<DownloadRequestLimiter> limiter,
+ const content::ResourceRequestInfo::WebContentsGetter&
+ web_contents_getter,
+ const GURL& url,
+ const std::string& request_method);
// content::ResourceThrottle implementation:
void WillStartRequest(bool* defer) override;
« no previous file with comments | « chrome/browser/download/download_request_limiter.cc ('k') | chrome/browser/download/download_resource_throttle.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698