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

Issue 6480079: DownloadFile no longer keeps track of whether or not the final rename has occurred. (Closed)

Created:
9 years, 10 months ago by ahendrickson
Modified:
9 years, 7 months ago
CC:
chromium-reviews, rdsmith+dwatch_chromium.org, Paweł Hajdan Jr.
Visibility:
Public.

Description

DownloadFile no longer keeps track of whether or not the final rename has occurred. Instead, DownloadFileManager puts the DownloadFile in a new map when it has the final name. This is a step towards moving the 'final rename' determination happen in the UI thread. BUG=None TEST=None Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=75400

Patch Set 1 #

Total comments: 6

Patch Set 2 : Refactored DownloadFile cleanup. #

Total comments: 6

Patch Set 3 : Removed extraneous code and fixed shutdown issue. #

Patch Set 4 : Oops. #

Total comments: 6

Patch Set 5 : Fixed nits. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+59 lines, -130 lines) Patch
M chrome/browser/download/base_file.h View 1 2 3 chunks +1 line, -7 lines 0 comments Download
M chrome/browser/download/base_file.cc View 1 2 4 chunks +1 line, -5 lines 0 comments Download
M chrome/browser/download/base_file_unittest.cc View 8 chunks +2 lines, -15 lines 0 comments Download
M chrome/browser/download/download_file_manager.h View 1 2 3 4 1 chunk +10 lines, -1 line 0 comments Download
M chrome/browser/download/download_file_manager.cc View 1 2 3 4 10 chunks +30 lines, -15 lines 0 comments Download
M chrome/browser/download/download_file_unittest.cc View 1 6 chunks +5 lines, -74 lines 0 comments Download
M chrome/browser/download/download_manager_unittest.cc View 1 2 chunks +9 lines, -11 lines 0 comments Download
M chrome/browser/download/save_file_manager.cc View 2 chunks +1 line, -2 lines 0 comments Download

Messages

Total messages: 7 (0 generated)
Randy Smith (Not in Mondays)
Background (sorta 50/50 for each of us): This CL keeps the state of "is_final_rename", it ...
9 years, 10 months ago (2011-02-15 22:18:10 UTC) #1
ahendrickson
http://codereview.chromium.org/6480079/diff/1/chrome/browser/download/base_file.h File chrome/browser/download/base_file.h (right): http://codereview.chromium.org/6480079/diff/1/chrome/browser/download/base_file.h#newcode58 chrome/browser/download/base_file.h:58: virtual bool is_download_complete() const { return download_complete_; } On ...
9 years, 10 months ago (2011-02-17 14:52:46 UTC) #2
Randy Smith (Not in Mondays)
I'd also enhance the issue description to indicate that this change is in prep for ...
9 years, 10 months ago (2011-02-17 15:26:26 UTC) #3
ahendrickson
http://codereview.chromium.org/6480079/diff/5001/chrome/browser/download/base_file.h File chrome/browser/download/base_file.h (right): http://codereview.chromium.org/6480079/diff/5001/chrome/browser/download/base_file.h#newcode76 chrome/browser/download/base_file.h:76: On 2011/02/17 15:26:26, rdsmith wrote: > I think you ...
9 years, 10 months ago (2011-02-17 18:51:34 UTC) #4
ahendrickson
Sigh. Fixed dumb mistake.
9 years, 10 months ago (2011-02-17 22:50:43 UTC) #5
Paweł Hajdan Jr.
LGTM with minor comments. It's rather hard for me to determine whether this works, but ...
9 years, 10 months ago (2011-02-18 11:59:02 UTC) #6
ahendrickson
9 years, 10 months ago (2011-02-18 16:06:47 UTC) #7
http://codereview.chromium.org/6480079/diff/7005/chrome/browser/download/down...
File chrome/browser/download/download_file_manager.cc (right):

http://codereview.chromium.org/6480079/diff/7005/chrome/browser/download/down...
chrome/browser/download/download_file_manager.cc:374: if
(ContainsKey(downloads_, id)) {
On 2011/02/18 11:59:02, Paweł Hajdan Jr. wrote:
> nit: Return early if !ContainsKey.

Done.

http://codereview.chromium.org/6480079/diff/7005/chrome/browser/download/down...
File chrome/browser/download/download_file_manager.h (right):

http://codereview.chromium.org/6480079/diff/7005/chrome/browser/download/down...
chrome/browser/download/download_file_manager.h:138: // A map of all in progress
downloads.
On 2011/02/18 11:59:02, Paweł Hajdan Jr. wrote:
> Add a comment that it owns the contents, and also contains downloads that are
in
> the |downloads_with_final_name_| map.

Done.

http://codereview.chromium.org/6480079/diff/7005/chrome/browser/download/down...
chrome/browser/download/download_file_manager.h:141: // A map of all in progress
downloads that have their final name.
On 2011/02/18 11:59:02, Paweł Hajdan Jr. wrote:
> Add a comment that it doesn't own the contents.

Done.

Powered by Google App Engine
This is Rietveld 408576698