diff options
author | dominich@chromium.org <dominich@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-10-05 17:50:50 +0000 |
---|---|---|
committer | dominich@chromium.org <dominich@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-10-05 17:50:50 +0000 |
commit | 3085c50e9961a71ec0bb473c26efad9ca6589e46 (patch) | |
tree | 7fd256605ce42e8e4ddee423e0dde13a655ff355 /chrome/browser/browsing_data_remover.cc | |
parent | 56f38f4aee4a6fb282d20bd6f0f506661e00d81f (diff) | |
download | chromium_src-3085c50e9961a71ec0bb473c26efad9ca6589e46.zip chromium_src-3085c50e9961a71ec0bb473c26efad9ca6589e46.tar.gz chromium_src-3085c50e9961a71ec0bb473c26efad9ca6589e46.tar.bz2 |
Moved PrerenderManager to ProfileKeyedService system.
As per https://groups.google.com/a/chromium.org/group/chromium-dev/browse_thread/thread/554b5b0ca05e001d# it is recommended that weak references to services be removed from Profiles and constructed as ProfileKeyedServices instead. This does this for the PrerenderManager.
(Continuation of http://codereview.chromium.org/7795009/)
BUG=94643
TEST=Prerender*
Review URL: http://codereview.chromium.org/7846001
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@104130 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/browsing_data_remover.cc')
-rw-r--r-- | chrome/browser/browsing_data_remover.cc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/chrome/browser/browsing_data_remover.cc b/chrome/browser/browsing_data_remover.cc index 3a6f91d..0d7f021 100644 --- a/chrome/browser/browsing_data_remover.cc +++ b/chrome/browser/browsing_data_remover.cc @@ -26,6 +26,7 @@ #include "chrome/browser/plugin_data_remover.h" #include "chrome/browser/prefs/pref_member.h" #include "chrome/browser/prerender/prerender_manager.h" +#include "chrome/browser/prerender/prerender_manager_factory.h" #include "chrome/browser/profiles/profile.h" #include "chrome/browser/renderer_host/web_cache_manager.h" #include "chrome/browser/search_engines/template_url_service.h" @@ -180,7 +181,7 @@ void BrowsingDataRemover::Remove(int remove_mask) { // It also may have a prerendered page. If so, the page could be considered // to have a small amount of historical information, so delete it, too. prerender::PrerenderManager* prerender_manager = - profile_->GetPrerenderManager(); + prerender::PrerenderManagerFactory::GetForProfile(profile_); if (prerender_manager) { prerender_manager->ClearData( prerender::PrerenderManager::CLEAR_PRERENDER_CONTENTS | @@ -286,7 +287,7 @@ void BrowsingDataRemover::Remove(int remove_mask) { // The PrerenderManager may have a page actively being prerendered, which // is essentially a preemptively cached page. prerender::PrerenderManager* prerender_manager = - profile_->GetPrerenderManager(); + prerender::PrerenderManagerFactory::GetForProfile(profile_); if (prerender_manager) { prerender_manager->ClearData( prerender::PrerenderManager::CLEAR_PRERENDER_CONTENTS); |