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

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

Issue 9226037: Cancel prerenders from Omnibox if we navigate to a different URL than predicted (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove debug logging Created 8 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_manager.h
diff --git a/chrome/browser/prerender/prerender_manager.h b/chrome/browser/prerender/prerender_manager.h
index 3a3ec35ff041dfde6e118b71c978e378c57c9ea6..54e22c3d1d9135bcd0174699379eefb8fcc1952a 100644
--- a/chrome/browser/prerender/prerender_manager.h
+++ b/chrome/browser/prerender/prerender_manager.h
@@ -121,6 +121,9 @@ class PrerenderManager : public base::SupportsWeakPtr<PrerenderManager>,
// Cancels all active prerenders.
void CancelAllPrerenders();
+ // Cancels all active prerenders with the ORIGIN_OMNIBOX origin.
+ void CancelOmniboxPrerenders();
+
// For a given WebContents that wants to navigate to the URL supplied,
// determines whether a prerendered version of the URL can be used,
// and substitutes the prerendered RVH into the WebContents. |opener_url| is
@@ -217,6 +220,11 @@ class PrerenderManager : public base::SupportsWeakPtr<PrerenderManager>,
bool IsPendingEntry(const GURL& url) const;
+ // Returns true if |url| matches any URLs being prerendered.
+ // TODO(dominich): This should be a const method but FindEntry is not const.
+ // It should be.
+ bool IsPrerendering(const GURL& url);
+
protected:
void SetPrerenderContentsFactory(
PrerenderContents::Factory* prerender_contents_factory);

Powered by Google App Engine
This is Rietveld 408576698