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

Issue 3026012: Download code cleanup: (Closed)

Created:
10 years, 5 months ago by Paweł Hajdan Jr.
Modified:
9 years, 7 months ago
CC:
chromium-reviews, Paul Godavari, ben+cc_chromium.org
Visibility:
Public.

Description

Download code cleanup: Changed the code to be more object-oriented. Instead of exposing 150 accessors we should do as much as possible inside the object, exposing a nice API. DownloadFile just got a small step closer to that. Also, reduce amount of state duplication. For example, information about the download progress was both in DownloadFile and DownloadFileManager (maybe it's still somewhere else). The download path information is still duplicated, removing it is going to be harder. Finally, removed completely unused state variables from DownloadFile. TEST=unit_tests, browser_tests, ui_tests BUG=48913 Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=53217

Patch Set 1 #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+71 lines, -48 lines) Patch
M chrome/browser/download/download_file.h View 4 chunks +10 lines, -19 lines 1 comment Download
M chrome/browser/download/download_file.cc View 8 chunks +41 lines, -15 lines 0 comments Download
M chrome/browser/download/download_file_manager.cc View 5 chunks +20 lines, -14 lines 0 comments Download

Messages

Total messages: 2 (0 generated)
Paweł Hajdan Jr.
10 years, 5 months ago (2010-07-21 00:43:08 UTC) #1
darin (slow to review)
10 years, 5 months ago (2010-07-21 04:44:02 UTC) #2
LGTM

http://codereview.chromium.org/3026012/diff/1/3
File chrome/browser/download/download_file.h (right):

http://codereview.chromium.org/3026012/diff/1/3#newcode21
chrome/browser/download/download_file.h:21: class ResourceDispatcherHost;
it would be nice if we limited the number of classes that needed to know about
ResourceDispatcherHost.  i see that you are just passing it through, so this is
fine, but we should think about ways to minimize dependencies on RDH.  doing so
should help make the code less spaghetti like.

Powered by Google App Engine
This is Rietveld 408576698