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

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: Fixed compile error. 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
Index: content/browser/download/download_file.h
diff --git a/content/browser/download/download_file.h b/content/browser/download/download_file.h
index 3424054cb82aa5ff36d0dd956b5da45b865bf534..fb2489fa23cccf64450d015443376bb217695ce0 100644
--- a/content/browser/download/download_file.h
+++ b/content/browser/download/download_file.h
@@ -25,8 +25,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();
@@ -65,7 +66,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_;

Powered by Google App Engine
This is Rietveld 408576698