diff options
author | cbentzel@chromium.org <cbentzel@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-04-22 18:04:09 +0000 |
---|---|---|
committer | cbentzel@chromium.org <cbentzel@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-04-22 18:04:09 +0000 |
commit | a4fa83b987f37cc28f5af761655fe6c6e69c4359 (patch) | |
tree | c9f1db17cea17c756ec56b42af1810f51413d9c6 /chrome/test/testing_profile.h | |
parent | 5f7a75d708b6c4d6257a1e4f88ec8abaf7b39242 (diff) | |
download | chromium_src-a4fa83b987f37cc28f5af761655fe6c6e69c4359.zip chromium_src-a4fa83b987f37cc28f5af761655fe6c6e69c4359.tar.gz chromium_src-a4fa83b987f37cc28f5af761655fe6c6e69c4359.tar.bz2 |
PrerenderManager is no longer refcounted.
The PrerenderManager should be destroyed on the UI thread, along with
the PrerenderContents that it owns.
I originally did this by using the DeleteOnUIThread trait, but this
leaked PrerenderManager's during browser shutdown, since the last
reference was held by an object on the IO thread, and the DeleteTask
was never processed.
Now, the Profile owns the PrerenderManager's lifetime. All other
references to the PrerenderManager are weak references. With the
current thread-safety restrictions of WeakPtr's, this means that the
presence of a PrererenderManager can not be checked on the IO thread,
so all LOAD_PREFETCH requests will have a PrerenderResourceHandler
constructed, regardless of whether the current profile supports
prerendering.
BUG=77930
TEST=Existing unit tests and browser tests.
Review URL: http://codereview.chromium.org/6877085
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@82669 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/test/testing_profile.h')
-rw-r--r-- | chrome/test/testing_profile.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/chrome/test/testing_profile.h b/chrome/test/testing_profile.h index 3e74b92..c8639e3 100644 --- a/chrome/test/testing_profile.h +++ b/chrome/test/testing_profile.h @@ -399,7 +399,7 @@ class TestingProfile : public Profile { scoped_ptr<ChromeURLDataManager> chrome_url_data_manager_; - scoped_refptr<prerender::PrerenderManager> prerender_manager_; + scoped_ptr<prerender::PrerenderManager> prerender_manager_; // We keep a weak pointer to the dependency manager we want to notify on our // death. Defaults to the Singleton implementation but overridable for |