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

Unified Diff: content/browser/download/download_file.h

Issue 8399001: Use a DownloadRequestHandle pointer in construction to allow mocking for tests. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge to TOT. Created 9 years, 2 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
« no previous file with comments | « chrome/browser/download/download_manager_unittest.cc ('k') | content/browser/download/download_file.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/download/download_file.h
diff --git a/content/browser/download/download_file.h b/content/browser/download/download_file.h
index d7795c716e1a4d38122e00d23e08a36b2b536f85..bb334a5726d49fdeca654f54c202cc9992600429 100644
--- a/content/browser/download/download_file.h
+++ b/content/browser/download/download_file.h
@@ -26,8 +26,9 @@ class ResourceDispatcherHost;
// cancelled, the DownloadFile is destroyed.
class CONTENT_EXPORT DownloadFile : public BaseFile {
public:
+ // Takes ownership of the object pointed to by |request_handle|.
DownloadFile(const DownloadCreateInfo* info,
- const DownloadRequestHandle& request_handle,
+ DownloadRequestHandleInterface* request_handle,
DownloadManager* download_manager);
virtual ~DownloadFile();
@@ -67,7 +68,7 @@ class CONTENT_EXPORT DownloadFile : public BaseFile {
// The handle to the request information. Used for operations outside the
// download system, specifically canceling a download.
- DownloadRequestHandle request_handle_;
+ scoped_ptr<DownloadRequestHandleInterface> request_handle_;
// DownloadManager this download belongs to.
scoped_refptr<DownloadManager> download_manager_;
« no previous file with comments | « chrome/browser/download/download_manager_unittest.cc ('k') | content/browser/download/download_file.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698