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 045581cbc63c4ee35b6089afe56336290a041199..57141c184d6c3837ac3bc865559b182416c0c1c0 100644 |
| --- a/chrome/browser/prerender/prerender_manager.h |
| +++ b/chrome/browser/prerender/prerender_manager.h |
| @@ -9,6 +9,7 @@ |
| #include <list> |
| #include "base/non_thread_safe.h" |
| +#include "base/ref_counted.h" |
| #include "base/scoped_ptr.h" |
| #include "base/time.h" |
| #include "googleurl/src/gurl.h" |
| @@ -19,7 +20,8 @@ class TabContents; |
| // PrerenderManager is responsible for initiating and keeping prerendered |
| // views of webpages. |
| -class PrerenderManager : NonThreadSafe { |
| +class PrerenderManager : public base::RefCounted<PrerenderManager>, |
|
willchan no longer on Chromium
2010/12/17 21:45:17
Add a TODO(willchan): to remove the refcounting.
cbentzel
2010/12/19 00:40:56
Yes. I didn't want to make it refcounted.
cbentzel
2010/12/19 00:40:56
I put the TODO in ChromeURLRequestContext, which s
|
| + private NonThreadSafe { |
|
willchan no longer on Chromium
2010/12/17 21:45:17
Please avoid private inheritance: http://www.paras
cbentzel
2010/12/19 00:40:56
I can, but this seems like a perfect example of wh
|
| public: |
| // Owned by a Profile object for the lifetime of the profile. |
| explicit PrerenderManager(Profile* profile); |
| @@ -56,6 +58,8 @@ class PrerenderManager : NonThreadSafe { |
| virtual PrerenderContents* CreatePrerenderContents(const GURL& url); |
| private: |
| + friend class base::RefCounted<PrerenderManager>; |
| + |
| struct PrerenderContentsData; |
| bool IsPrerenderElementFresh(const base::Time start) const; |