Index: chrome/browser/history/top_sites_impl.cc |
diff --git a/chrome/browser/history/top_sites_impl.cc b/chrome/browser/history/top_sites_impl.cc |
index 5d1a78d1ffce9c33f6fdbbeab34cc5e977e8e951..90af20a4a89561b181011c23c232c837c13c68d1 100644 |
--- a/chrome/browser/history/top_sites_impl.cc |
+++ b/chrome/browser/history/top_sites_impl.cc |
@@ -373,13 +373,15 @@ void TopSitesImpl::ClearBlacklistedURLs() { |
NotifyTopSitesChanged(); |
} |
-void TopSitesImpl::Shutdown() { |
+void TopSitesImpl::ShutdownOnUIThread() { |
profile_ = NULL; |
// Cancel all requests so that the service doesn't callback to us after we've |
// invoked Shutdown (this could happen if we have a pending request and |
// Shutdown is invoked). |
cancelable_task_tracker_.TryCancelAll(); |
- backend_->Shutdown(); |
+ registrar_.RemoveAll(); |
+ if (backend_) |
+ backend_->Shutdown(); |
} |
// static |