New issue
Advanced search Search tips

Issue 682350 link

Starred by 1 user

Issue metadata

Status: Started
Owner:
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

DownloadJob refactor

Project Member Reported by xingliu@chromium.org, Jan 18 2017

Issue description

Refactor DownloadItemImpl code. 

1. Categorize member fields into RequestInfo, DestinationInfo, ResponseInfo structs.

2. Adding DownloadJob interface, so different kind of downloads have implementation of DownloadJob which carries logic and state machines.
 
Project Member

Comment 1 by bugdroid1@chromium.org, Jan 27 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/f61d39f8a151e11949079994228823ca9720cba1

commit f61d39f8a151e11949079994228823ca9720cba1
Author: xingliu <xingliu@chromium.org>
Date: Fri Jan 27 22:46:46 2017

Introduce DownloadJob for DownloadItem refactoring.

1. DownloadJob is to delegate actual download logic from
DownloadItemImpl. Also it can be used
for parallel download feature, which is a DownloadJob manages
list of smaller tasks(pieces of parallel download segments).

2. DownloadJob base class provides an content internal interface.
The public interface of DownloadItem is intact.

3. Add unit test and mock structure for DownloadJob.

This CL only checks in the interface. Pulling out
DownloadItemImpl logic and subclass of DownloadJob will come
in later CL.

BUG=682350

Review-Url: https://codereview.chromium.org/2645133003
Cr-Commit-Position: refs/heads/master@{#446806}

[modify] https://crrev.com/f61d39f8a151e11949079994228823ca9720cba1/content/browser/BUILD.gn
[add] https://crrev.com/f61d39f8a151e11949079994228823ca9720cba1/content/browser/download/download_job.cc
[add] https://crrev.com/f61d39f8a151e11949079994228823ca9720cba1/content/browser/download/download_job.h
[add] https://crrev.com/f61d39f8a151e11949079994228823ca9720cba1/content/browser/download/download_job_unittest.cc
[add] https://crrev.com/f61d39f8a151e11949079994228823ca9720cba1/content/browser/download/mock_download_job.cc
[add] https://crrev.com/f61d39f8a151e11949079994228823ca9720cba1/content/browser/download/mock_download_job.h
[modify] https://crrev.com/f61d39f8a151e11949079994228823ca9720cba1/content/test/BUILD.gn

Sign in to add a comment