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

Unified Diff: content/browser/download/download_file_unittest.cc

Issue 11028131: Shift passage of FileStream in downloads system to be by scoped_ptr<>. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Incorporated Al's comments. Created 8 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_unittest.cc
diff --git a/content/browser/download/download_file_unittest.cc b/content/browser/download/download_file_unittest.cc
index 24eaade547ec246906dac97f05ae49c3152d346a..0414be79dd8a31861a3a5a9cc47e9d602702a2c8 100644
--- a/content/browser/download/download_file_unittest.cc
+++ b/content/browser/download/download_file_unittest.cc
@@ -139,17 +139,17 @@ class DownloadFileTest : public testing::Test {
.WillOnce(Invoke(this, &DownloadFileTest::RegisterCallback))
.RetiresOnSaturation();
- DownloadCreateInfo info;
+ scoped_ptr<DownloadCreateInfo> info(new DownloadCreateInfo());
// info.request_handle default constructed to null.
- info.download_id = DownloadId(kValidIdDomain, kDummyDownloadId + offset);
- info.save_info.file_stream = file_stream_;
+ info->download_id = DownloadId(kValidIdDomain, kDummyDownloadId + offset);
download_file_.reset(
new DownloadFileImpl(
- &info,
+ info.Pass(),
scoped_ptr<content::ByteStreamReader>(input_stream_).Pass(),
- new DownloadRequestHandle(),
+ scoped_ptr<DownloadRequestHandleInterface>(
+ new DownloadRequestHandle()),
download_manager_, calculate_hash,
- scoped_ptr<content::PowerSaveBlocker>(NULL).Pass(),
+ scoped_ptr<content::PowerSaveBlocker>(),
net::BoundNetLog()));
EXPECT_CALL(*input_stream_, Read(_, _))
@@ -274,8 +274,6 @@ class DownloadFileTest : public testing::Test {
protected:
scoped_refptr<StrictMock<LocalMockDownloadManager> > download_manager_;
- linked_ptr<net::FileStream> file_stream_;
-
// DownloadFile instance we are testing.
scoped_ptr<DownloadFile> download_file_;
« no previous file with comments | « content/browser/download/download_file_manager_unittest.cc ('k') | content/browser/download/download_item_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698