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

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

Issue 1751603002: [Downloads] Rework how hashes are calculated for download files. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address first round of comments Created 4 years, 9 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
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_
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 const std::vector<GURL>& url_chain, 47 const std::vector<GURL>& url_chain,
48 const GURL& referrer_url, 48 const GURL& referrer_url,
49 const std::string& mime_type, 49 const std::string& mime_type,
50 const std::string& original_mime_type, 50 const std::string& original_mime_type,
51 const base::Time& start_time, 51 const base::Time& start_time,
52 const base::Time& end_time, 52 const base::Time& end_time,
53 const std::string& etag, 53 const std::string& etag,
54 const std::string& last_modified, 54 const std::string& last_modified,
55 int64_t received_bytes, 55 int64_t received_bytes,
56 int64_t total_bytes, 56 int64_t total_bytes,
57 const std::string& hash,
57 DownloadItem::DownloadState state, 58 DownloadItem::DownloadState state,
58 DownloadDangerType danger_type, 59 DownloadDangerType danger_type,
59 DownloadInterruptReason interrupt_reason, 60 DownloadInterruptReason interrupt_reason,
60 bool opened, 61 bool opened,
61 const net::BoundNetLog& bound_net_log) = 0; 62 const net::BoundNetLog& bound_net_log) = 0;
62 63
63 virtual DownloadItemImpl* CreateActiveItem( 64 virtual DownloadItemImpl* CreateActiveItem(
64 DownloadItemImplDelegate* delegate, 65 DownloadItemImplDelegate* delegate,
65 uint32_t download_id, 66 uint32_t download_id,
66 const DownloadCreateInfo& info, 67 const DownloadCreateInfo& info,
67 const net::BoundNetLog& bound_net_log) = 0; 68 const net::BoundNetLog& bound_net_log) = 0;
68 69
69 virtual DownloadItemImpl* CreateSavePageItem( 70 virtual DownloadItemImpl* CreateSavePageItem(
70 DownloadItemImplDelegate* delegate, 71 DownloadItemImplDelegate* delegate,
71 uint32_t download_id, 72 uint32_t download_id,
72 const base::FilePath& path, 73 const base::FilePath& path,
73 const GURL& url, 74 const GURL& url,
74 const std::string& mime_type, 75 const std::string& mime_type,
75 scoped_ptr<DownloadRequestHandleInterface> request_handle, 76 scoped_ptr<DownloadRequestHandleInterface> request_handle,
76 const net::BoundNetLog& bound_net_log) = 0; 77 const net::BoundNetLog& bound_net_log) = 0;
77 }; 78 };
78 79
79 } // namespace content 80 } // namespace content
80 81
81 #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_ITEM_FACTORY_H_ 82 #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_ITEM_FACTORY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698