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

Unified Diff: chrome/browser/profile.cc

Issue 3347018: GTTF: Clean up DownloadFileManager (Closed)
Patch Set: shutdowns Created 10 years, 3 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 | « chrome/browser/download/save_file.cc ('k') | chrome/browser/profile_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/profile.cc
diff --git a/chrome/browser/profile.cc b/chrome/browser/profile.cc
index 5c3669cca58b2fd06aabd85c7caafc3aa901eb45..f95a4ed9cc1d186466cea46816bde42cd0422456 100644
--- a/chrome/browser/profile.cc
+++ b/chrome/browser/profile.cc
@@ -514,9 +514,13 @@ class OffTheRecordProfileImpl : public Profile,
#endif // defined(OS_CHROMEOS)
virtual void ExitedOffTheRecordMode() {
- // Drop our download manager so we forget about all the downloads made
- // in off-the-record mode.
- download_manager_ = NULL;
+ // DownloadManager is lazily created, so check before accessing it.
+ if (download_manager_.get()) {
+ // Drop our download manager so we forget about all the downloads made
+ // in off-the-record mode.
+ download_manager_->Shutdown();
+ download_manager_ = NULL;
+ }
}
virtual void Observe(NotificationType type,
« no previous file with comments | « chrome/browser/download/save_file.cc ('k') | chrome/browser/profile_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698