Chromium Code Reviews| Index: chrome/browser/prerender/prerender_manager.h |
| diff --git a/chrome/browser/prerender/prerender_manager.h b/chrome/browser/prerender/prerender_manager.h |
| index 356b33a9c7fea0b8184dff362f062a1f3edb53a5..ca0d1984cf1e9351fb07d45e625266e5574b9513 100644 |
| --- a/chrome/browser/prerender/prerender_manager.h |
| +++ b/chrome/browser/prerender/prerender_manager.h |
| @@ -44,6 +44,11 @@ void HandlePrefetchTagOnUIThread( |
| const GURL& referrer, |
| bool make_pending); |
| +void DestroyPreloadForChildRouteIdPairOnUIThread( |
|
jam
2011/05/02 16:21:33
nit: this name seems a bit long. we usually use "
dominich
2011/05/02 16:45:55
Done and I will fix the HandlePrefetchTag above to
|
| + const base::WeakPtr<PrerenderManager>& prerender_manager_weak_ptr, |
| + const std::pair<int, int>& child_route_id_pair, |
| + FinalStatus final_status); |
| + |
| // PrerenderManager is responsible for initiating and keeping prerendered |
| // views of webpages. All methods must be called on the UI thread unless |
| // indicated otherwise. |
| @@ -78,6 +83,12 @@ class PrerenderManager : public base::SupportsWeakPtr<PrerenderManager>, |
| const GURL& url, |
| const GURL& referrer); |
| + // Destroy all preloads for the given child route id pair and assign a final |
| + // status to them. |
| + void DestroyPreloadForChildRouteIdPair( |
| + 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, |
| // and substitutes the prerendered RVH into the TabContents. Returns |
| @@ -145,6 +156,9 @@ class PrerenderManager : public base::SupportsWeakPtr<PrerenderManager>, |
| static bool MaybeGetQueryStringBasedAliasURL(const GURL& url, |
| GURL* alias_url); |
| + // Returns true if the method given is invalid for prerendering. |
| + static bool IsValidHttpMethod(const std::string& method); |
| + |
| protected: |
| struct PendingContentsData; |
| @@ -184,6 +198,12 @@ class PrerenderManager : public base::SupportsWeakPtr<PrerenderManager>, |
| // ownership of the PrerenderContents. |
| PrerenderContents* FindEntry(const GURL& url); |
| + // Returns the iterator to the PrerenderContentsData entry that is being |
| + // prerendered from the given child route id pair. |
| + std::list<PrerenderContentsData>::iterator |
| + FindPrerenderContentsForChildRouteIdPair( |
| + const std::pair<int, int>& child_route_id_pair); |
| + |
| // Returns whether the PrerenderManager is currently within the prerender |
| // window - effectively, up to 30 seconds after a prefetch tag has been |
| // observed. |