OLD | NEW |
---|---|
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "chrome/browser/download/download_service.h" | 5 #include "chrome/browser/download/download_service.h" |
6 | 6 |
7 #include "base/callback.h" | 7 #include "base/callback.h" |
8 #include "chrome/browser/browser_process.h" | 8 #include "chrome/browser/browser_process.h" |
9 #include "chrome/browser/download/chrome_download_manager_delegate.h" | 9 #include "chrome/browser/download/chrome_download_manager_delegate.h" |
10 #include "chrome/browser/download/download_service_factory.h" | 10 #include "chrome/browser/download/download_service_factory.h" |
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
100 | 100 |
101 void DownloadService::Shutdown() { | 101 void DownloadService::Shutdown() { |
102 if (download_manager_created_) { | 102 if (download_manager_created_) { |
103 // Normally the DownloadManager would be shutdown later, after the Profile | 103 // Normally the DownloadManager would be shutdown later, after the Profile |
104 // goes away and BrowserContext's destructor runs. But that would be too | 104 // goes away and BrowserContext's destructor runs. But that would be too |
105 // late for us since we need to use the profile (indirectly through history | 105 // late for us since we need to use the profile (indirectly through history |
106 // code) when the DownloadManager is shutting down. So we shut it down | 106 // code) when the DownloadManager is shutting down. So we shut it down |
107 // manually earlier. See http://crbug.com/131692 | 107 // manually earlier. See http://crbug.com/131692 |
108 BrowserContext::GetDownloadManager(profile_)->Shutdown(); | 108 BrowserContext::GetDownloadManager(profile_)->Shutdown(); |
109 } | 109 } |
110 manager_delegate_.release(); | 110 manager_delegate_ = NULL; |
Randy Smith (Not in Mondays)
2012/07/23 18:33:33
Whoops; nice catch.
| |
111 } | 111 } |
OLD | NEW |