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

Unified Diff: chrome/browser/prerender/prerender_local_predictor.h

Issue 10214004: Fix destruction concurrency issue in PrerenderLocalPredictor: (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 8 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/browser/prerender/prerender_local_predictor.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/prerender/prerender_local_predictor.h
===================================================================
--- chrome/browser/prerender/prerender_local_predictor.h (revision 133717)
+++ chrome/browser/prerender/prerender_local_predictor.h (working copy)
@@ -56,6 +56,14 @@
scoped_ptr<std::vector<history::BriefVisitInfo> > visit_history_;
bool visit_history_initialized_;
+ // We keep a reference to the HistoryService which we registered to
+ // observe. On destruction, we have to remove ourselves from that history
+ // service. We can't just grab the HistoryService from the profile, because
+ // the profile may have already given up its reference to it. Doing nothing
+ // in this case may cause crashes, because the HistoryService may outlive the
+ // the PrerenderLocalPredictor.
+ scoped_refptr<HistoryService> observing_history_service_;
+
DISALLOW_COPY_AND_ASSIGN(PrerenderLocalPredictor);
};
« no previous file with comments | « no previous file | chrome/browser/prerender/prerender_local_predictor.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698