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

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

Issue 11363222: Persist download interrupt reason, both target and current paths, and url_chain. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merged to r180302 Created 7 years, 10 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
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 11
12 #include <string> 12 #include <string>
13 #include <vector>
13 14
14 #include "base/memory/scoped_ptr.h" 15 #include "base/memory/scoped_ptr.h"
15 #include "content/public/browser/download_id.h" 16 #include "content/public/browser/download_id.h"
16 #include "content/public/browser/download_item.h" 17 #include "content/public/browser/download_item.h"
17 18
18 class GURL; 19 class GURL;
19 20
20 namespace base { 21 namespace base {
21 class FilePath; 22 class FilePath;
22 } 23 }
(...skipping 10 matching lines...) Expand all
33 class DownloadRequestHandleInterface; 34 class DownloadRequestHandleInterface;
34 struct DownloadCreateInfo; 35 struct DownloadCreateInfo;
35 36
36 class DownloadItemFactory { 37 class DownloadItemFactory {
37 public: 38 public:
38 virtual ~DownloadItemFactory() {} 39 virtual ~DownloadItemFactory() {}
39 40
40 virtual DownloadItemImpl* CreatePersistedItem( 41 virtual DownloadItemImpl* CreatePersistedItem(
41 DownloadItemImplDelegate* delegate, 42 DownloadItemImplDelegate* delegate,
42 DownloadId download_id, 43 DownloadId download_id,
43 const base::FilePath& path, 44 const base::FilePath& current_path,
44 const GURL& url, 45 const base::FilePath& target_path,
46 const std::vector<GURL>& url_chain,
45 const GURL& referrer_url, 47 const GURL& referrer_url,
46 const base::Time& start_time, 48 const base::Time& start_time,
47 const base::Time& end_time, 49 const base::Time& end_time,
48 int64 received_bytes, 50 int64 received_bytes,
49 int64 total_bytes, 51 int64 total_bytes,
50 content::DownloadItem::DownloadState state, 52 DownloadItem::DownloadState state,
53 DownloadDangerType danger_type,
54 DownloadInterruptReason interrupt_reason,
51 bool opened, 55 bool opened,
52 const net::BoundNetLog& bound_net_log) = 0; 56 const net::BoundNetLog& bound_net_log) = 0;
53 57
54 virtual DownloadItemImpl* CreateActiveItem( 58 virtual DownloadItemImpl* CreateActiveItem(
55 DownloadItemImplDelegate* delegate, 59 DownloadItemImplDelegate* delegate,
56 const DownloadCreateInfo& info, 60 const DownloadCreateInfo& info,
57 const net::BoundNetLog& bound_net_log) = 0; 61 const net::BoundNetLog& bound_net_log) = 0;
58 62
59 virtual DownloadItemImpl* CreateSavePageItem( 63 virtual DownloadItemImpl* CreateSavePageItem(
60 DownloadItemImplDelegate* delegate, 64 DownloadItemImplDelegate* delegate,
61 const base::FilePath& path, 65 const base::FilePath& path,
62 const GURL& url, 66 const GURL& url,
63 DownloadId download_id, 67 DownloadId download_id,
64 const std::string& mime_type, 68 const std::string& mime_type,
65 const net::BoundNetLog& bound_net_log) = 0; 69 const net::BoundNetLog& bound_net_log) = 0;
66 }; 70 };
67 71
68 } // namespace content 72 } // namespace content
69 73
70 #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_ITEM_FACTORY_H_ 74 #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_ITEM_FACTORY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698