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

Issue 1542063003: [download] Make DownloadItemObserver be owned by DownloadItem. (Closed)

Created:
5 years ago by asanka
Modified:
5 years ago
Reviewers:
svaldez
CC:
chromium-reviews, asanka
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

[download] Make DownloadItemObserver be owned by DownloadItem. Currently DownloadPathRerservationTracker creates a self owned DownloadItem::Observer implementation called DownloadItemObserver. Make this class be owned by DownloadItem instead via the SupportsUserData interface. By itself this change doesn't buy us much. However, when DownloadItems start automatically resuming from interruptions without changing the externally visible state, this ownership would automatically get us lifetime managment as well as a guarantee that only one DownloadItemObserver can exist per DownloadItem. BUG=7648 Committed: https://crrev.com/fbf8cb0e546cd5d20d660a63c8cf36c38e38e680 Cr-Commit-Position: refs/heads/master@{#366654}

Patch Set 1 #

Total comments: 2

Patch Set 2 : Remove unnecessary RemoveUserData() call. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+20 lines, -5 lines) Patch
M chrome/browser/download/download_path_reservation_tracker.cc View 1 6 chunks +20 lines, -5 lines 0 comments Download

Messages

Total messages: 16 (8 generated)
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1542063003/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1542063003/1
5 years ago (2015-12-22 19:00:03 UTC) #4
asanka
5 years ago (2015-12-22 19:00:06 UTC) #5
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
5 years ago (2015-12-22 19:38:08 UTC) #7
svaldez
lgtm https://codereview.chromium.org/1542063003/diff/1/chrome/browser/download/download_path_reservation_tracker.cc File chrome/browser/download/download_path_reservation_tracker.cc (right): https://codereview.chromium.org/1542063003/diff/1/chrome/browser/download/download_path_reservation_tracker.cc#newcode348 chrome/browser/download/download_path_reservation_tracker.cc:348: void DownloadItemObserver::OnDownloadDestroyed(DownloadItem* download) { This is probably fine, ...
5 years ago (2015-12-22 19:59:55 UTC) #8
asanka
https://codereview.chromium.org/1542063003/diff/1/chrome/browser/download/download_path_reservation_tracker.cc File chrome/browser/download/download_path_reservation_tracker.cc (right): https://codereview.chromium.org/1542063003/diff/1/chrome/browser/download/download_path_reservation_tracker.cc#newcode348 chrome/browser/download/download_path_reservation_tracker.cc:348: void DownloadItemObserver::OnDownloadDestroyed(DownloadItem* download) { On 2015/12/22 19:59:55, svaldez wrote: ...
5 years ago (2015-12-22 20:18:02 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1542063003/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1542063003/20001
5 years ago (2015-12-22 20:18:33 UTC) #12
commit-bot: I haz the power
Committed patchset #2 (id:20001)
5 years ago (2015-12-22 21:20:14 UTC) #14
commit-bot: I haz the power
5 years ago (2015-12-22 21:21:13 UTC) #16
Message was sent while issue was closed.
Patchset 2 (id:??) landed as
https://crrev.com/fbf8cb0e546cd5d20d660a63c8cf36c38e38e680
Cr-Commit-Position: refs/heads/master@{#366654}

Powered by Google App Engine
This is Rietveld 408576698