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

Unified Diff: ios/chrome/browser/ui/preload_controller.mm

Issue 2629073003: Ensure PreloadController is deallocated. (Closed)
Patch Set: Created 3 years, 11 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 | « ios/chrome/browser/ui/preload_controller.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/chrome/browser/ui/preload_controller.mm
diff --git a/ios/chrome/browser/ui/preload_controller.mm b/ios/chrome/browser/ui/preload_controller.mm
index cc8fcf7b764af814526955f9d1579d549f5ac29d..5c4c43d33074aadb72dffd61782c90b461500ed9 100644
--- a/ios/chrome/browser/ui/preload_controller.mm
+++ b/ios/chrome/browser/ui/preload_controller.mm
@@ -138,6 +138,11 @@ class PrefetchDelegate : public net::URLFetcherDelegate {
return self;
}
+- (void)browserStateDestroyed {
+ [self cancelPrerender];
+ connectionTypeObserverBridge_.reset();
+}
+
- (void)dealloc {
UMA_HISTOGRAM_COUNTS(kPrerendersPerSessionCountHistogramName,
successfulPrerendersPerSessionCount_);
« no previous file with comments | « ios/chrome/browser/ui/preload_controller.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698