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

Issue 230103002: [Downloads] Ask DownloadHistory if a download was from history. (Closed)

Created:
6 years, 8 months ago by asanka
Modified:
6 years ago
CC:
chromium-reviews, benjhayden+dwatch_chromium.org, asanka
Visibility:
Public.

Description

[Downloads] Ask DownloadHistory if a download was from history. Observers of downloads currently assume that any download that is created in the IN_PROGRESS state must be a new download, while all others were restored from history. Pending changes to how downloads are created in response to failed requests will mean that this assumption will no longer hold. This CL adds a WasRestoredFromHistory() method to DownloadHistory which determines whether a given download was restored from history. BUG=7648 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=270749

Patch Set 1 : #

Total comments: 8

Patch Set 2 : Move responsibility of determining whether to show a download in the UI to DownloadItemModel #

Total comments: 19

Patch Set 3 : Address comments. Now depends on https://codereview.chromium.org/248713004/ #

Patch Set 4 : Merge with r269779 #

Patch Set 5 : Fix build #

Patch Set 6 : Fix build #

Unified diffs Side-by-side diffs Delta from patch set Stats (+444 lines, -109 lines) Patch
M chrome/browser/download/download_browsertest.cc View 1 2 3 1 chunk +4 lines, -0 lines 0 comments Download
M chrome/browser/download/download_history.h View 1 2 chunks +13 lines, -2 lines 0 comments Download
M chrome/browser/download/download_history.cc View 1 2 3 7 chunks +33 lines, -6 lines 0 comments Download
M chrome/browser/download/download_history_unittest.cc View 1 2 3 17 chunks +90 lines, -11 lines 0 comments Download
M chrome/browser/download/download_item_model.h View 1 1 chunk +10 lines, -6 lines 0 comments Download
M chrome/browser/download/download_item_model.cc View 1 5 chunks +35 lines, -10 lines 0 comments Download
M chrome/browser/download/download_service.h View 1 2 3 2 chunks +4 lines, -2 lines 0 comments Download
M chrome/browser/download/download_service.cc View 1 2 3 1 chunk +2 lines, -3 lines 0 comments Download
M chrome/browser/download/download_ui_controller.h View 1 2 1 chunk +7 lines, -14 lines 0 comments Download
M chrome/browser/download/download_ui_controller.cc View 1 2 5 chunks +16 lines, -16 lines 0 comments Download
M chrome/browser/download/download_ui_controller_unittest.cc View 1 2 3 4 5 4 chunks +230 lines, -39 lines 0 comments Download

Messages

Total messages: 11 (0 generated)
asanka
6 years, 8 months ago (2014-04-10 02:53:13 UTC) #1
Randy Smith (Not in Mondays)
https://codereview.chromium.org/230103002/diff/20001/chrome/browser/download/download_history.h File chrome/browser/download/download_history.h (right): https://codereview.chromium.org/230103002/diff/20001/chrome/browser/download/download_history.h#newcode72 chrome/browser/download/download_history.h:72: // persisted state may not have been updated yet ...
6 years, 8 months ago (2014-04-10 18:03:23 UTC) #2
asanka
https://codereview.chromium.org/230103002/diff/20001/chrome/browser/download/download_history.h File chrome/browser/download/download_history.h (right): https://codereview.chromium.org/230103002/diff/20001/chrome/browser/download/download_history.h#newcode72 chrome/browser/download/download_history.h:72: // persisted state may not have been updated yet ...
6 years, 8 months ago (2014-04-17 21:16:09 UTC) #3
Randy Smith (Not in Mondays)
This LGTM (with the notes below), but in reviewing the test I find myself uncomfortable ...
6 years, 8 months ago (2014-04-21 18:21:22 UTC) #4
asanka
Noted the concern about UI observers. I do have a plan for cleaning that up, ...
6 years, 8 months ago (2014-04-23 05:51:09 UTC) #5
Randy Smith (Not in Mondays)
Only one concern left. https://codereview.chromium.org/230103002/diff/40001/chrome/browser/download/download_ui_controller_unittest.cc File chrome/browser/download/download_ui_controller_unittest.cc (right): https://codereview.chromium.org/230103002/diff/40001/chrome/browser/download/download_ui_controller_unittest.cc#newcode210 chrome/browser/download/download_ui_controller_unittest.cc:210: EXPECT_CALL(*manager_, AddObserver(_)) On 2014/04/23 05:51:09, ...
6 years, 8 months ago (2014-04-23 19:18:57 UTC) #6
asanka
https://codereview.chromium.org/230103002/diff/40001/chrome/browser/download/download_ui_controller_unittest.cc File chrome/browser/download/download_ui_controller_unittest.cc (right): https://codereview.chromium.org/230103002/diff/40001/chrome/browser/download/download_ui_controller_unittest.cc#newcode210 chrome/browser/download/download_ui_controller_unittest.cc:210: EXPECT_CALL(*manager_, AddObserver(_)) On 2014/04/23 19:18:57, rdsmith wrote: > On ...
6 years, 7 months ago (2014-05-07 23:19:53 UTC) #7
Randy Smith (Not in Mondays)
https://codereview.chromium.org/230103002/diff/40001/chrome/browser/download/download_ui_controller_unittest.cc File chrome/browser/download/download_ui_controller_unittest.cc (right): https://codereview.chromium.org/230103002/diff/40001/chrome/browser/download/download_ui_controller_unittest.cc#newcode210 chrome/browser/download/download_ui_controller_unittest.cc:210: EXPECT_CALL(*manager_, AddObserver(_)) On 2014/05/07 23:19:53, asanka wrote: > On ...
6 years, 7 months ago (2014-05-08 17:21:04 UTC) #8
asanka
The CQ bit was checked by asanka@chromium.org
6 years, 7 months ago (2014-05-15 14:50:27 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/asanka@chromium.org/230103002/120001
6 years, 7 months ago (2014-05-15 14:50:45 UTC) #10
commit-bot: I haz the power
6 years, 7 months ago (2014-05-15 18:35:23 UTC) #11
Message was sent while issue was closed.
Change committed as 270749

Powered by Google App Engine
This is Rietveld 408576698