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

Side by Side Diff: chrome/browser/download/download_service.cc

Issue 10808054: Don't leak ChromeDownloadManagerDelegate in DownloadService (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Don't remove suppression for issue 58449 Created 8 years, 5 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | tools/valgrind/memcheck/suppressions.txt » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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;
111 } 111 }
OLDNEW
« no previous file with comments | « no previous file | tools/valgrind/memcheck/suppressions.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698