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

Unified Diff: content/browser/download/download_manager_impl.cc

Issue 10535135: Made ownership of DownloadRequestHandles clear through scoped_ptr<> (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Incorporated comments. Created 8 years, 6 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
Index: content/browser/download/download_manager_impl.cc
diff --git a/content/browser/download/download_manager_impl.cc b/content/browser/download/download_manager_impl.cc
index b374565ae68b6e5efedac2cf2790c57b80b091e8..7fd102bdfa8a297d922c1278f4a0a31ec83f3c22 100644
--- a/content/browser/download/download_manager_impl.cc
+++ b/content/browser/download/download_manager_impl.cc
@@ -152,11 +152,11 @@ class DownloadItemFactoryImpl : public content::DownloadItemFactory {
virtual content::DownloadItem* CreateActiveItem(
DownloadItemImpl::Delegate* delegate,
const DownloadCreateInfo& info,
- DownloadRequestHandleInterface* request_handle,
+ scoped_ptr<DownloadRequestHandleInterface> request_handle,
bool is_otr,
const net::BoundNetLog& bound_net_log) OVERRIDE {
- return new DownloadItemImpl(delegate, info, request_handle, is_otr,
- bound_net_log);
+ return new DownloadItemImpl(delegate, info, request_handle.Pass(),
+ is_otr, bound_net_log);
}
virtual content::DownloadItem* CreateSavePageItem(
@@ -460,7 +460,8 @@ net::BoundNetLog DownloadManagerImpl::CreateDownloadItem(
if (!info->download_id.IsValid())
info->download_id = GetNextId();
DownloadItem* download = factory_->CreateActiveItem(
- this, *info, new DownloadRequestHandle(request_handle),
+ this, *info, scoped_ptr<DownloadRequestHandleInterface>(
+ new DownloadRequestHandle(request_handle)).Pass(),
browser_context_->IsOffTheRecord(), bound_net_log);
int32 download_id = info->download_id.local();
« no previous file with comments | « content/browser/download/download_item_impl_unittest.cc ('k') | content/browser/download/download_manager_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698