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

Issue 15485002: DownloadTestObserver should know when the DownloadManager was shutdown (Closed)

Created:
7 years, 7 months ago by cmarcelo
Modified:
7 years, 7 months ago
CC:
chromium-reviews, joi+watch-content_chromium.org, darin-cc_chromium.org, jam
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Visibility:
Public.

Description

DownloadTestObserver should know when the DownloadManager was shutdown DownloadTestObserver now uses ManagerGoingDown() interface to know whether its manager was shutdown. This allows it to use a raw pointer instead of a refptr. By removing the refptr to DownloadManager, this commit will help the change of DownloadManager to be owned by BrowserContext instead of a refcounted object. Previously we were piggybacking on the refptr to bind callbacks with download manager. Now we use weak pointers to the DownloadTestObserver object itself, and it'll guard whether the download manager was shutdown or not. This patch also removes some outdated commentary about "file select dialog". BUG=237871 TEST=content_unittests and browser_tests with filter for Download\* Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=201539

Patch Set 1 #

Total comments: 1

Patch Set 2 : Use CHECK_EQ #

Unified diffs Side-by-side diffs Delta from patch set Stats (+53 lines, -51 lines) Patch
M content/public/test/download_test_observer.h View 7 chunks +16 lines, -17 lines 0 comments Download
M content/public/test/download_test_observer.cc View 1 8 chunks +37 lines, -34 lines 0 comments Download

Messages

Total messages: 7 (0 generated)
cmarcelo
phajdan.jr: could you take a look at this please? Added benjhayden as reviewer too because ...
7 years, 7 months ago (2013-05-20 18:02:28 UTC) #1
Paweł Hajdan Jr.
-me, +rdsmith Looks fine to me at a glance, but I'd prefer Randy to take ...
7 years, 7 months ago (2013-05-21 18:02:19 UTC) #2
Randy Smith (Not in Mondays)
I'm happy relying on Ben's review. It LGTM from a cursory glance (but wait for ...
7 years, 7 months ago (2013-05-21 18:15:45 UTC) #3
benjhayden
one nit then LGTM. https://codereview.chromium.org/15485002/diff/1/content/public/test/download_test_observer.cc File content/public/test/download_test_observer.cc (right): https://codereview.chromium.org/15485002/diff/1/content/public/test/download_test_observer.cc#newcode97 content/public/test/download_test_observer.cc:97: ASSERT_TRUE(manager == download_manager_); Please use ...
7 years, 7 months ago (2013-05-21 18:18:58 UTC) #4
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/caio.de.oliveira.filho@intel.com/15485002/7001
7 years, 7 months ago (2013-05-21 21:22:20 UTC) #5
Paweł Hajdan Jr.
LGTM
7 years, 7 months ago (2013-05-21 21:30:52 UTC) #6
commit-bot: I haz the power
7 years, 7 months ago (2013-05-22 15:48:25 UTC) #7
Message was sent while issue was closed.
Change committed as 201539

Powered by Google App Engine
This is Rietveld 408576698