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

Unified Diff: chrome/browser/prerender/prerender_resource_throttle.h

Issue 2576443002: [PlzNavigate] Use WebContentsGetter in PrerenderResourceThrottle (Closed)
Patch Set: add comment Created 4 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
« no previous file with comments | « no previous file | chrome/browser/prerender/prerender_resource_throttle.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/prerender/prerender_resource_throttle.h
diff --git a/chrome/browser/prerender/prerender_resource_throttle.h b/chrome/browser/prerender/prerender_resource_throttle.h
index 472dca6db22a3dde8a1da5aa750fcb214fb0d995..f0143ea0e8a9e8036d9e12a0c353aa752ca108f7 100644
--- a/chrome/browser/prerender/prerender_resource_throttle.h
+++ b/chrome/browser/prerender/prerender_resource_throttle.h
@@ -10,6 +10,7 @@
#include "base/macros.h"
#include "base/memory/ref_counted.h"
#include "base/memory/weak_ptr.h"
+#include "content/public/browser/resource_request_info.h"
#include "content/public/browser/resource_throttle.h"
#include "content/public/common/resource_type.h"
@@ -55,9 +56,9 @@ class PrerenderResourceThrottle
const base::WeakPtr<PrerenderResourceThrottle>& throttle,
const std::string& method,
content::ResourceType resource_type,
- int render_process_id,
- int render_frame_id,
const GURL& url,
+ const content::ResourceRequestInfo::WebContentsGetter&
+ web_contents_getter,
scoped_refptr<PrerenderThrottleInfo> prerender_throttle_info);
static void WillRedirectRequestOnUI(
@@ -66,22 +67,21 @@ class PrerenderResourceThrottle
content::ResourceType resource_type,
bool async,
bool is_no_store,
- int render_process_id,
- int render_frame_id,
- const GURL& new_url);
+ const GURL& new_url,
+ const content::ResourceRequestInfo::WebContentsGetter&
+ web_contents_getter);
static void WillProcessResponseOnUI(
bool is_main_resource,
bool is_no_store,
int redirect_count,
- int render_process_id,
- int render_frame_id,
scoped_refptr<PrerenderThrottleInfo> prerender_throttle_info);
- // Helper to return the PrerenderContents given a render frame id. May return
- // NULL if it's gone.
- static PrerenderContents* PrerenderContentsFromRenderFrame(
- int render_process_id, int render_frame_id);
+ // Helper to return the PrerenderContents given a WebContentsGetter. May
+ // return nullptr if it's gone.
+ static PrerenderContents* PrerenderContentsFromGetter(
+ const content::ResourceRequestInfo::WebContentsGetter&
+ web_contents_getter);
net::URLRequest* request_;
« no previous file with comments | « no previous file | chrome/browser/prerender/prerender_resource_throttle.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698