diff options
author | gavinp@chromium.org <gavinp@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-11-29 22:41:35 +0000 |
---|---|---|
committer | gavinp@chromium.org <gavinp@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-11-29 22:41:35 +0000 |
commit | 62cdf8418c87ee3281ebe9f81a31912c92cac084 (patch) | |
tree | 855a4f2db59132111705338fc5e42ba7df947c4a /chrome/browser/prerender/prerender_manager.h | |
parent | 3791473981bc197c118e5edf4160c9f7a0838e34 (diff) | |
download | chromium_src-62cdf8418c87ee3281ebe9f81a31912c92cac084.zip chromium_src-62cdf8418c87ee3281ebe9f81a31912c92cac084.tar.gz chromium_src-62cdf8418c87ee3281ebe9f81a31912c92cac084.tar.bz2 |
Make PrerenderData explicitly own its prerender_contents.
Not much was left to add the scoped_ptr.
This change depends on https://codereview.chromium.org/11421076/
R=mmenke@chromium.org
BUG=None
Review URL: https://chromiumcodereview.appspot.com/11412197
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@170261 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/prerender/prerender_manager.h')
-rw-r--r-- | chrome/browser/prerender/prerender_manager.h | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/chrome/browser/prerender/prerender_manager.h b/chrome/browser/prerender/prerender_manager.h index dd39a56..8b4b2bb 100644 --- a/chrome/browser/prerender/prerender_manager.h +++ b/chrome/browser/prerender/prerender_manager.h @@ -48,7 +48,8 @@ struct hash<content::WebContents*> { return reinterpret_cast<std::size_t>(value); } }; -} + +} // namespace BASE_HASH_NAMESPACE #endif @@ -291,7 +292,9 @@ class PrerenderManager : public base::SupportsWeakPtr<PrerenderManager>, // other handles continue to track it. void OnCancelByHandle(); - PrerenderContents* contents() { return contents_; } + PrerenderContents* contents() { return contents_.get(); } + + PrerenderContents* ReleaseContents(); int handle_count() const { return handle_count_; } @@ -302,7 +305,7 @@ class PrerenderManager : public base::SupportsWeakPtr<PrerenderManager>, private: PrerenderManager* manager_; - PrerenderContents* contents_; + scoped_ptr<PrerenderContents> contents_; // The number of distinct PrerenderHandles created for |this|, including // ones that have called PrerenderData::OnNavigateAwayByHandle(), but not @@ -433,10 +436,6 @@ class PrerenderManager : public base::SupportsWeakPtr<PrerenderManager>, Origin origin, uint8 experiment_id); - // Deletes any PrerenderContents that have been added to the pending delete - // list. - void DeletePendingDeleteEntries(); - // Insures the |active_prerenders_| are sorted by increasing expiry time. Call // after every mutation of active_prerenders_ that can possibly make it // unsorted (e.g. an insert, or changing an expiry time). |