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

Unified Diff: content/test/test_file_error_injector.cc

Issue 10392111: Use ByteStream in downloads system to decouple source and sink. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Sync'd to LKGR. Created 8 years, 6 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 | « content/content_tests.gypi ('k') | net/base/net_log_event_type_list.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/test/test_file_error_injector.cc
diff --git a/content/test/test_file_error_injector.cc b/content/test/test_file_error_injector.cc
index 09d96e05dc949509a7a51b3ed512989ba0a21376..b7585dfa11f58943d1a3b52d85f9e9fdcbb0416b 100644
--- a/content/test/test_file_error_injector.cc
+++ b/content/test/test_file_error_injector.cc
@@ -17,6 +17,10 @@
#include "content/public/browser/download_id.h"
#include "googleurl/src/gurl.h"
+namespace content {
+class ByteStreamReader;
+}
+
namespace {
DownloadFileManager* GetDownloadFileManager() {
@@ -35,6 +39,7 @@ class DownloadFileWithErrors: public DownloadFileImpl {
DownloadFileWithErrors(
const DownloadCreateInfo* info,
+ scoped_ptr<content::ByteStreamReader> stream,
DownloadRequestHandleInterface* request_handle,
content::DownloadManager* download_manager,
bool calculate_hash,
@@ -73,6 +78,7 @@ class DownloadFileWithErrors: public DownloadFileImpl {
DownloadFileWithErrors::DownloadFileWithErrors(
const DownloadCreateInfo* info,
+ scoped_ptr<content::ByteStreamReader> stream,
DownloadRequestHandleInterface* request_handle,
content::DownloadManager* download_manager,
bool calculate_hash,
@@ -81,6 +87,7 @@ DownloadFileWithErrors::DownloadFileWithErrors(
const ConstructionCallback& ctor_callback,
const DestructionCallback& dtor_callback)
: DownloadFileImpl(info,
+ stream.Pass(),
request_handle,
download_manager,
calculate_hash,
@@ -157,6 +164,7 @@ class DownloadFileWithErrorsFactory
// DownloadFileFactory interface.
virtual content::DownloadFile* CreateFile(
DownloadCreateInfo* info,
+ scoped_ptr<content::ByteStreamReader> stream,
const DownloadRequestHandle& request_handle,
content::DownloadManager* download_manager,
bool calculate_hash,
@@ -188,6 +196,7 @@ DownloadFileWithErrorsFactory::~DownloadFileWithErrorsFactory() {
content::DownloadFile* DownloadFileWithErrorsFactory::CreateFile(
DownloadCreateInfo* info,
+ scoped_ptr<content::ByteStreamReader> stream,
const DownloadRequestHandle& request_handle,
content::DownloadManager* download_manager,
bool calculate_hash,
@@ -206,6 +215,7 @@ content::DownloadFile* DownloadFileWithErrorsFactory::CreateFile(
}
return new DownloadFileWithErrors(info,
+ stream.Pass(),
new DownloadRequestHandle(request_handle),
download_manager,
calculate_hash,
« no previous file with comments | « content/content_tests.gypi ('k') | net/base/net_log_event_type_list.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698