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

Side by Side Diff: chrome/browser/download/download_manager.h

Issue 3498002: Fix leak of a DownloadItem in SavePackage::Init. (Closed)
Patch Set: rebase 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 unified diff | Download patch
« no previous file with comments | « no previous file | chrome/browser/download/save_package.cc » ('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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 // The DownloadManager object manages the process of downloading, including 5 // The DownloadManager object manages the process of downloading, including
6 // updates to the history system and providing the information for displaying 6 // updates to the history system and providing the information for displaying
7 // the downloads view in the Destinations tab. There is one DownloadManager per 7 // the downloads view in the Destinations tab. There is one DownloadManager per
8 // active profile in Chrome. 8 // active profile in Chrome.
9 // 9 //
10 // Download observers: 10 // Download observers:
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 128
129 // Remove downloads will delete all downloads that have a timestamp that is 129 // Remove downloads will delete all downloads that have a timestamp that is
130 // the same or more recent than |remove_begin|. The number of downloads 130 // the same or more recent than |remove_begin|. The number of downloads
131 // deleted is returned back to the caller. 131 // deleted is returned back to the caller.
132 int RemoveDownloads(const base::Time remove_begin); 132 int RemoveDownloads(const base::Time remove_begin);
133 133
134 // Remove all downloads will delete all downloads. The number of downloads 134 // Remove all downloads will delete all downloads. The number of downloads
135 // deleted is returned back to the caller. 135 // deleted is returned back to the caller.
136 int RemoveAllDownloads(); 136 int RemoveAllDownloads();
137 137
138 // Called when a Save Page As download is started. 138 // Called when a Save Page As download is started. Transfers ownership
139 // of |download_item| to the DownloadManager.
139 void SavePageAsDownloadStarted(DownloadItem* download_item); 140 void SavePageAsDownloadStarted(DownloadItem* download_item);
140 141
141 // Download the object at the URL. Used in cases such as "Save Link As..." 142 // Download the object at the URL. Used in cases such as "Save Link As..."
142 void DownloadUrl(const GURL& url, 143 void DownloadUrl(const GURL& url,
143 const GURL& referrer, 144 const GURL& referrer,
144 const std::string& referrer_encoding, 145 const std::string& referrer_encoding,
145 TabContents* tab_contents); 146 TabContents* tab_contents);
146 147
147 // Download the object at the URL and save it to the specified path. The 148 // Download the object at the URL and save it to the specified path. The
148 // download is treated as the temporary download and thus will not appear 149 // download is treated as the temporary download and thus will not appear
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after
346 // The "Save As" dialog box used to ask the user where a file should be 347 // The "Save As" dialog box used to ask the user where a file should be
347 // saved. 348 // saved.
348 scoped_refptr<SelectFileDialog> select_file_dialog_; 349 scoped_refptr<SelectFileDialog> select_file_dialog_;
349 350
350 scoped_ptr<OtherDownloadManagerObserver> other_download_manager_observer_; 351 scoped_ptr<OtherDownloadManagerObserver> other_download_manager_observer_;
351 352
352 DISALLOW_COPY_AND_ASSIGN(DownloadManager); 353 DISALLOW_COPY_AND_ASSIGN(DownloadManager);
353 }; 354 };
354 355
355 #endif // CHROME_BROWSER_DOWNLOAD_DOWNLOAD_MANAGER_H_ 356 #endif // CHROME_BROWSER_DOWNLOAD_DOWNLOAD_MANAGER_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/download/save_package.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698