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

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

Issue 10344024: Rewrite download manager unit to be actual unit tests. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Sync'd to LKGR. 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
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4 //
5 // The DownloadItemFactory is used to produce different DownloadItems.
6 // It is separate from the DownloadManager to allow download manager
7 // unit tests to control the items produced.
8
9 #ifndef CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_ITEM_FACTORY_H_
10 #define CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_ITEM_FACTORY_H_
11 #pragma once
12
13 #include "content/browser/download/download_item_impl.h"
14
15 #include <string>
16
17 struct DownloadCreateInfo;
18 class DownloadRequestHandleInterface;
19 class FilePath;
20 class GURL;
21
22 namespace content {
23 class DownloadId;
24 class DownloadItem;
25 struct DownloadPersistentStoreInfo;
26 }
27
28 namespace net {
29 class BoundNetLog;
30 }
31
32 namespace content {
33
34 class DownloadItemFactory {
35 public:
36 virtual ~DownloadItemFactory() {}
37
38 virtual content::DownloadItem* CreatePersistedItem(
39 DownloadItemImpl::Delegate* delegate,
40 content::DownloadId download_id,
41 const content::DownloadPersistentStoreInfo& info,
42 const net::BoundNetLog& bound_net_log) = 0;
43
44 virtual content::DownloadItem* CreateActiveItem(
45 DownloadItemImpl::Delegate* delegate,
46 const DownloadCreateInfo& info,
47 DownloadRequestHandleInterface* request_handle,
48 bool is_otr,
49 const net::BoundNetLog& bound_net_log) = 0;
50
51 virtual content::DownloadItem* CreateSavePageItem(
52 DownloadItemImpl::Delegate* delegate,
53 const FilePath& path,
54 const GURL& url,
55 bool is_otr,
56 content::DownloadId download_id,
57 const std::string& mime_type,
58 const net::BoundNetLog& bound_net_log) = 0;
59 };
60
61 } // namespace content
62
63 #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_ITEM_FACTORY_H_
OLDNEW
« no previous file with comments | « content/browser/browser_context.cc ('k') | content/browser/download/download_item_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698