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

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

Issue 141163002: Make PrerenderTracker's resource_throttle_io_thread_map_ use RenderFrame IDs instead of RenderView … (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: simplify code Created 6 years, 11 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/prerender/prerender_contents.h
===================================================================
--- chrome/browser/prerender/prerender_contents.h (revision 245386)
+++ chrome/browser/prerender/prerender_contents.h (working copy)
@@ -44,6 +44,7 @@
class PrerenderHandle;
class PrerenderManager;
+class PrerenderResourceThrottle;
class PrerenderContents : public content::NotificationObserver,
public content::WebContentsObserver {
@@ -315,6 +316,12 @@
static const int kNumCookieStatuses;
+ // Called when a PrerenderResourceThrottle defers a request. If the prerender
+ // is used it'll be resumed on the IO thread, otherwise they will get
+ // cancelled automatically if prerendering is cancelled.
+ void AddResourceThrottle(
+ const base::WeakPtr<PrerenderResourceThrottle>& throttle);
+
protected:
PrerenderContents(PrerenderManager* prerender_manager,
Profile* profile,
@@ -467,6 +474,10 @@
// occurred, using 1 bit for each possible InternalCookieEvent.
int cookie_status_;
+ // Resources that are throttled, pending a prerender use. Can only access a
+ // throttle on the IO thread.
+ std::vector<base::WeakPtr<PrerenderResourceThrottle> > resource_throttles_;
+
DISALLOW_COPY_AND_ASSIGN(PrerenderContents);
};

Powered by Google App Engine
This is Rietveld 408576698