Index: chrome/browser/prerender/prerender_manager.h |
diff --git a/chrome/browser/prerender/prerender_manager.h b/chrome/browser/prerender/prerender_manager.h |
index 616cb35a38763d59f5cf15392e03579993c0f9f1..bd312390d5cd3564826aa94df0a9be733aa126e1 100644 |
--- a/chrome/browser/prerender/prerender_manager.h |
+++ b/chrome/browser/prerender/prerender_manager.h |
@@ -50,7 +50,7 @@ void HandleTag( |
const GURL& url, |
const GURL& referrer); |
-void DestroyPreloadForRenderView( |
+void DestroyPrerenderForRenderView( |
const base::WeakPtr<PrerenderManager>& prerender_manager_weak_ptr, |
int child_id, |
int route_id, |
@@ -77,30 +77,36 @@ class PrerenderManager : public base::SupportsWeakPtr<PrerenderManager>, |
virtual ~PrerenderManager(); |
- // Preloads |url| if valid. |child_route_id_pair| identifies the |
+ // Starts a prerender for |url| if valid. |child_route_id_pair| identifies the |
// RenderViewHost that the prerender request came from and is used to |
// set the initial window size of the RenderViewHost used for prerendering. |
// Returns true if the URL was added, false if it was not. |
// If |child_route_id_pair| itself is prerendering, adds the preloads as |
// a pending preload. |
- bool AddPreload( |
+ bool AddPrerender( |
const std::pair<int, int>& child_route_id_pair, |
const GURL& url, |
const GURL& referrer); |
- // Destroy all preloads for the given child route id pair and assign a final |
+ // Starts a prerender for |url| if valid. As the prerender request is coming |
+ // from a source without a RenderViewHost (ie, the omnibox) we don't have a |
+ // child or route id, or a referrer. This method uses sensible values for |
+ // those. |
+ bool AddPrerenderWithNoTag(const GURL& url); |
+ |
+ // Destroy all prerenders for the given child route id pair and assign a final |
// status to them. |
- virtual void DestroyPreloadForChildRouteIdPair( |
+ virtual void DestroyPrerenderForChildRouteIdPair( |
const std::pair<int, int>& child_route_id_pair, |
FinalStatus final_status); |
// For a given TabContents that wants to navigate to the URL supplied, |
- // determines whether a preloaded version of the URL can be used, |
+ // determines whether a prerendered version of the URL can be used, |
// and substitutes the prerendered RVH into the TabContents. Returns |
// whether or not a prerendered RVH could be used or not. |
- bool MaybeUsePreloadedPage(TabContents* tab_contents, |
- const GURL& url, |
- bool has_opener_set); |
+ bool MaybeUsePrerenderedPage(TabContents* tab_contents, |
+ const GURL& url, |
+ bool has_opener_set); |
// Moves a PrerenderContents to the pending delete list from the list of |
// active prerenders when prerendering should be cancelled. |
@@ -212,9 +218,9 @@ class PrerenderManager : public base::SupportsWeakPtr<PrerenderManager>, |
// Adds a pending preload issued by the prerendering RenderView identified by |
// |child_route_id_pair|. If and when that prerendering RenderView is used, |
// the specified prerender will start. |
- void AddPendingPreload(const std::pair<int, int>& child_route_id_pair, |
- const GURL& url, |
- const GURL& referrer); |
+ void AddPendingPrerender(const std::pair<int, int>& child_route_id_pair, |
+ const GURL& url, |
+ const GURL& referrer); |
// Starts scheduling periodic cleanups. |
void StartSchedulingPeriodicCleanups(); |
@@ -262,7 +268,7 @@ class PrerenderManager : public base::SupportsWeakPtr<PrerenderManager>, |
// Called when removing a preload to ensure we clean up any pending preloads |
// that might remain in the map. |
- void RemovePendingPreload(PrerenderContents* entry); |
+ void RemovePendingPrerender(PrerenderContents* entry); |
bool DoesRateLimitAllowPrerender() const; |