From 8d0c23eeb75151fc39ec6db2f58bcac097904bf4 Mon Sep 17 00:00:00 2001 From: "tyoshino@chromium.org" Date: Fri, 2 Aug 2013 11:02:30 +0000 Subject: Make ByteStream independent from DownloadInterruptReason Change status type to int to make it portable to other component. After this change, ByteStream could be moved under src/net/base/ or src/base directory. - Comment fix (MaybePostToPeer -> Write) BUG=169957 Review URL: https://chromiumcodereview.appspot.com/18284005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@215265 0039d316-1c4b-4281-b951-d872f2087c98 --- content/browser/download/download_file_impl.cc | 3 ++- content/browser/download/download_file_unittest.cc | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) (limited to 'content/browser/download') diff --git a/content/browser/download/download_file_impl.cc b/content/browser/download/download_file_impl.cc index edd7fed..bbe317b 100644 --- a/content/browser/download/download_file_impl.cc +++ b/content/browser/download/download_file_impl.cc @@ -232,7 +232,8 @@ void DownloadFileImpl::StreamActive() { break; case ByteStreamReader::STREAM_COMPLETE: { - reason = stream_reader_->GetStatus(); + reason = static_cast( + stream_reader_->GetStatus()); SendUpdate(); base::TimeTicks close_start(base::TimeTicks::Now()); file_.Finish(); diff --git a/content/browser/download/download_file_unittest.cc b/content/browser/download/download_file_unittest.cc index a3aafff..ebf501d 100644 --- a/content/browser/download/download_file_unittest.cc +++ b/content/browser/download/download_file_unittest.cc @@ -41,7 +41,7 @@ class MockByteStreamReader : public ByteStreamReader { // ByteStream functions MOCK_METHOD2(Read, ByteStreamReader::StreamState( scoped_refptr*, size_t*)); - MOCK_CONST_METHOD0(GetStatus, DownloadInterruptReason()); + MOCK_CONST_METHOD0(GetStatus, int()); MOCK_METHOD1(RegisterCallback, void(const base::Closure&)); }; -- cgit v1.1