Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(9426)

Unified Diff: chrome/renderer/prerender/prerender_dispatcher.h

Issue 10391134: Fix memory leak in PrerenderDispatcher. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: back to patch set 1 Created 8 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/renderer/prerender/prerender_dispatcher.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/renderer/prerender/prerender_dispatcher.h
diff --git a/chrome/renderer/prerender/prerender_dispatcher.h b/chrome/renderer/prerender/prerender_dispatcher.h
index 5537401112cb13637d6849b91f2c780a153c335d..3ee2b7f3217cb3edea22dd9f79ed2ee9d8ab89b6 100644
--- a/chrome/renderer/prerender/prerender_dispatcher.h
+++ b/chrome/renderer/prerender/prerender_dispatcher.h
@@ -9,15 +9,20 @@
#include <map>
#include "base/compiler_specific.h"
+#include "base/memory/scoped_ptr.h"
#include "content/public/renderer/render_process_observer.h"
class GURL;
namespace prerender {
+class PrerenderingSupport;
+
// PrerenderDispatcher keeps track of which URLs are being prerendered. There
// is only one PrerenderDispatcher per render process, and it will only be
-// aware of prerenders that are triggered by this render process.
+// aware of prerenders that are triggered by this render process. As well,
+// it holds on to other objects that must exist once per-renderer process,
+// such as the PrerenderingSupport.
class PrerenderDispatcher : public content::RenderProcessObserver {
public:
PrerenderDispatcher();
@@ -34,6 +39,10 @@ class PrerenderDispatcher : public content::RenderProcessObserver {
typedef std::map<GURL, int> PrerenderMap;
PrerenderMap prerender_urls_;
+
+ // There is one PrerenderingSupport object per renderer, and it provides
+ // the interface to prerendering to the WebKit platform.
+ scoped_ptr<PrerenderingSupport> prerendering_support_;
};
} // namespace prerender
« no previous file with comments | « no previous file | chrome/renderer/prerender/prerender_dispatcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698