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

Side by Side Diff: content/browser/download/download_item_factory.h

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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | content/browser/download/download_item_impl.h » ('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 // The DownloadItemFactory is used to produce different DownloadItems. 5 // The DownloadItemFactory is used to produce different DownloadItems.
6 // It is separate from the DownloadManager to allow download manager 6 // It is separate from the DownloadManager to allow download manager
7 // unit tests to control the items produced. 7 // unit tests to control the items produced.
8 8
9 #ifndef CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_ITEM_FACTORY_H_ 9 #ifndef CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_ITEM_FACTORY_H_
10 #define CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_ITEM_FACTORY_H_ 10 #define CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_ITEM_FACTORY_H_
11 #pragma once 11 #pragma once
12 12
13 #include <string>
14
15 #include "base/memory/scoped_ptr.h"
13 #include "content/browser/download/download_item_impl.h" 16 #include "content/browser/download/download_item_impl.h"
14 17
15 #include <string>
16
17 struct DownloadCreateInfo; 18 struct DownloadCreateInfo;
18 class DownloadRequestHandleInterface; 19 class DownloadRequestHandleInterface;
19 class FilePath; 20 class FilePath;
20 class GURL; 21 class GURL;
21 22
22 namespace content { 23 namespace content {
23 class DownloadId; 24 class DownloadId;
24 class DownloadItem; 25 class DownloadItem;
25 struct DownloadPersistentStoreInfo; 26 struct DownloadPersistentStoreInfo;
26 } 27 }
(...skipping 10 matching lines...) Expand all
37 38
38 virtual content::DownloadItem* CreatePersistedItem( 39 virtual content::DownloadItem* CreatePersistedItem(
39 DownloadItemImpl::Delegate* delegate, 40 DownloadItemImpl::Delegate* delegate,
40 content::DownloadId download_id, 41 content::DownloadId download_id,
41 const content::DownloadPersistentStoreInfo& info, 42 const content::DownloadPersistentStoreInfo& info,
42 const net::BoundNetLog& bound_net_log) = 0; 43 const net::BoundNetLog& bound_net_log) = 0;
43 44
44 virtual content::DownloadItem* CreateActiveItem( 45 virtual content::DownloadItem* CreateActiveItem(
45 DownloadItemImpl::Delegate* delegate, 46 DownloadItemImpl::Delegate* delegate,
46 const DownloadCreateInfo& info, 47 const DownloadCreateInfo& info,
47 DownloadRequestHandleInterface* request_handle, 48 scoped_ptr<DownloadRequestHandleInterface> request_handle,
48 bool is_otr, 49 bool is_otr,
49 const net::BoundNetLog& bound_net_log) = 0; 50 const net::BoundNetLog& bound_net_log) = 0;
50 51
51 virtual content::DownloadItem* CreateSavePageItem( 52 virtual content::DownloadItem* CreateSavePageItem(
52 DownloadItemImpl::Delegate* delegate, 53 DownloadItemImpl::Delegate* delegate,
53 const FilePath& path, 54 const FilePath& path,
54 const GURL& url, 55 const GURL& url,
55 bool is_otr, 56 bool is_otr,
56 content::DownloadId download_id, 57 content::DownloadId download_id,
57 const std::string& mime_type, 58 const std::string& mime_type,
58 const net::BoundNetLog& bound_net_log) = 0; 59 const net::BoundNetLog& bound_net_log) = 0;
59 }; 60 };
60 61
61 } // namespace content 62 } // namespace content
62 63
63 #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_ITEM_FACTORY_H_ 64 #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_ITEM_FACTORY_H_
OLDNEW
« no previous file with comments | « no previous file | content/browser/download/download_item_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698