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

Issue 9296012: Hooked up NetLog to DownloadItem, DownloadFile, and FileStream. (Closed)

Created:
8 years, 10 months ago by ahendrickson
Modified:
8 years, 10 months ago
CC:
chromium-reviews, Avi (use Gerrit), creis+watch_chromium.org, ajwong+watch_chromium.org, dcheng, joi+watch-content_chromium.org, darin-cc_chromium.org, rdsmith+dwatch_chromium.org, brettw-cc_chromium.org
Visibility:
Public.

Description

Hooked up NetLog to DownloadItem, DownloadFile, and FileStream. The ChromeNetLog object is owned by the browser process, which has a longer lifetime than the profile and therefore than the download system. For each download, there will be one BoundNetLog (or a copy thereof) used by DownloadItem and DownloadFile, and one separate one used by FileStream. For most downloads, the path to get a NetLog pointer to the download objects (DownloadItem, DownloadFile and FileStream) is through the URL request. A BoundNetLog is created and passed in to the DownloadResourceHandler constructor, which adds it to a DownloadCreateInfo that it makes. This gets it to DownloadItem, DownloadFile/BaseFile, and FileStream. For downloads created from the history database, the path is via the DownloadService and the DownloadManager constructor. Likewise for downloads created as part of a 'Save Page As' operation, although that may change in the future with further refactoring of the 'Save Page As' code. For downloads initiated by drag & drop on Linux and Mac (but not on Windows), the FileStream needs to get a NetLog pointer from another source. In this case, it is via the ContentClient (effectively a global) and ContentBrowserClient classes. Note that FileStream has a different NetLog source than the other classes. This is the final of 4 CLs that will enable net logging for downloads. BUG=None TEST=Go to a web page with downloadable content. Open a new tab with about:net-internals. Download a file. Check the EVENTS tab of about:net-internals: there should be DOWNLOAD and FILESTREAM events. Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=121050 Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=121195

Patch Set 1 #

Patch Set 2 : Merged with trunk #

Patch Set 3 : Merged with parent #

Patch Set 4 : Merged with parent #

Patch Set 5 : Fixed event type name for Download to refer to URL Request #

Total comments: 11

Patch Set 6 : Merged with parent #

Total comments: 7

Patch Set 7 : Not sure if anything changed . . . #

Patch Set 8 : Addressed Randy's comments. #

Total comments: 4

Patch Set 9 : Merged with parent, plus move the BoundNetLog construction. #

Patch Set 10 : Merged with parent #

Total comments: 2

Patch Set 11 : Merged with parent #

Patch Set 12 : Create DownloadItem's BoundNetLog closer to constructor #

Total comments: 10

Patch Set 13 : Renamed a variable & changed comments #

Total comments: 2

Patch Set 14 : Merged with trunk #

Unified diffs Side-by-side diffs Delta from patch set Stats (+423 lines, -350 lines) Patch
M chrome/browser/download/download_service.cc View 1 2 3 4 5 6 7 2 chunks +3 lines, -1 line 0 comments Download
M chrome/browser/resources/net_internals/source_entry.js View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +298 lines, -298 lines 0 comments Download
M content/browser/download/download_create_info.h View 1 2 3 4 5 6 7 8 9 10 11 12 4 chunks +7 lines, -1 line 0 comments Download
M content/browser/download/download_create_info.cc View 1 2 3 4 5 6 7 8 9 10 11 12 3 chunks +4 lines, -2 lines 0 comments Download
M content/browser/download/download_file_impl.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +4 lines, -2 lines 0 comments Download
M content/browser/download/download_file_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +3 lines, -2 lines 0 comments Download
M content/browser/download/download_file_manager.h View 1 2 3 4 5 6 7 8 9 10 11 3 chunks +8 lines, -2 lines 0 comments Download
M content/browser/download/download_file_manager.cc View 1 2 3 4 5 6 7 8 9 10 11 12 4 chunks +14 lines, -7 lines 0 comments Download
M content/browser/download/download_file_manager_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 3 chunks +6 lines, -3 lines 0 comments Download
M content/browser/download/download_file_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +2 lines, -1 line 0 comments Download
M content/browser/download/download_item_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +13 lines, -0 lines 0 comments Download
M content/browser/download/download_manager_impl.h View 1 2 3 4 5 6 7 8 9 10 11 3 chunks +5 lines, -2 lines 0 comments Download
M content/browser/download/download_manager_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 4 chunks +19 lines, -8 lines 0 comments Download
M content/browser/download/download_manager_impl_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 6 chunks +14 lines, -10 lines 0 comments Download
M content/browser/download/download_resource_handler.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +2 lines, -1 line 0 comments Download
M content/browser/download/drag_download_util.h View 1 2 3 2 chunks +4 lines, -2 lines 0 comments Download
M content/browser/download/drag_download_util.cc View 1 2 3 1 chunk +2 lines, -2 lines 0 comments Download
M content/browser/tab_contents/web_drag_source_gtk.cc View 1 2 3 4 5 6 7 2 chunks +4 lines, -1 line 0 comments Download
M content/browser/tab_contents/web_drag_source_mac.mm View 1 2 3 2 chunks +3 lines, -1 line 0 comments Download
M content/public/browser/download_manager.h View 1 2 3 4 5 6 7 8 9 10 11 12 3 chunks +5 lines, -2 lines 0 comments Download
M content/shell/shell_browser_context.cc View 1 2 3 4 5 6 7 1 chunk +2 lines, -1 line 0 comments Download
M content/test/mock_download_manager.h View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 25 (0 generated)
ahendrickson
This is last of 4 CLs, which must be landed in this order: http://codereview.chromium.org/9288084/ http://codereview.chromium.org/9223019/ ...
8 years, 10 months ago (2012-02-02 21:18:13 UTC) #1
mmenke
http://codereview.chromium.org/9296012/diff/17001/content/browser/download/download_create_info.h File content/browser/download/download_create_info.h (right): http://codereview.chromium.org/9296012/diff/17001/content/browser/download/download_create_info.h#newcode32 content/browser/download/download_create_info.h:32: const net::BoundNetLog& log, nit: bound_net_log http://codereview.chromium.org/9296012/diff/17001/content/browser/download/download_create_info.h#newcode116 content/browser/download/download_create_info.h:116: net::BoundNetLog bound_net_log; ...
8 years, 10 months ago (2012-02-03 18:12:35 UTC) #2
Randy Smith (Not in Mondays)
.h file review completed. Diving into more detailed review now. http://codereview.chromium.org/9296012/diff/18003/content/browser/download/download_manager_impl.h File content/browser/download/download_manager_impl.h (right): http://codereview.chromium.org/9296012/diff/18003/content/browser/download/download_manager_impl.h#newcode100 ...
8 years, 10 months ago (2012-02-03 19:22:13 UTC) #3
Randy Smith (Not in Mondays)
Sorry, one other high level comment (on the CL description): You've talked in detail about ...
8 years, 10 months ago (2012-02-03 19:23:40 UTC) #4
Randy Smith (Not in Mondays)
This looks pretty good. I'm not quite willing to stamp it yet, as I want ...
8 years, 10 months ago (2012-02-03 19:36:41 UTC) #5
ahendrickson
http://codereview.chromium.org/9296012/diff/17001/content/browser/download/download_create_info.h File content/browser/download/download_create_info.h (right): http://codereview.chromium.org/9296012/diff/17001/content/browser/download/download_create_info.h#newcode32 content/browser/download/download_create_info.h:32: const net::BoundNetLog& log, On 2012/02/03 18:12:36, Matt Menke wrote: ...
8 years, 10 months ago (2012-02-05 05:06:52 UTC) #6
Randy Smith (Not in Mondays)
This is fine as such but I do want to nail down the copying or ...
8 years, 10 months ago (2012-02-06 00:37:49 UTC) #7
mmenke
Just a couple small suggestions. Just want to review how SOURCE_DOWNLOADS will be deleted from ...
8 years, 10 months ago (2012-02-06 17:46:36 UTC) #8
ahendrickson
http://codereview.chromium.org/9296012/diff/19021/chrome/browser/resources/net_internals/source_entry.js File chrome/browser/resources/net_internals/source_entry.js (right): http://codereview.chromium.org/9296012/diff/19021/chrome/browser/resources/net_internals/source_entry.js#newcode220 chrome/browser/resources/net_internals/source_entry.js:220: * found. On 2012/02/06 17:46:37, Matt Menke wrote: > ...
8 years, 10 months ago (2012-02-06 23:03:45 UTC) #9
Randy Smith (Not in Mondays)
Um ... As I read this CL, you're logging DRH events onto the DI/DF BNL ...
8 years, 10 months ago (2012-02-07 15:20:39 UTC) #10
ahendrickson
On 2012/02/07 15:20:39, rdsmith wrote: > Um ... As I read this CL, you're logging ...
8 years, 10 months ago (2012-02-07 17:20:09 UTC) #11
ahendrickson
Moved the creation of DownloadItem's BoundNetLog closer to DownloadItem's constructor. http://codereview.chromium.org/9296012/diff/29001/content/browser/download/download_manager_impl.cc File content/browser/download/download_manager_impl.cc (right): http://codereview.chromium.org/9296012/diff/29001/content/browser/download/download_manager_impl.cc#newcode1181 ...
8 years, 10 months ago (2012-02-07 17:58:38 UTC) #12
Randy Smith (Not in Mondays)
LGTM with below comments. http://codereview.chromium.org/9296012/diff/35019/content/browser/download/download_create_info.h File content/browser/download/download_create_info.h (right): http://codereview.chromium.org/9296012/diff/35019/content/browser/download/download_create_info.h#newcode116 content/browser/download/download_create_info.h:116: const net::BoundNetLog bound_net_log; Willing to ...
8 years, 10 months ago (2012-02-07 23:19:14 UTC) #13
Randy Smith (Not in Mondays)
One further comment. And I want to explicitly say: My LGTM applies for content/public as ...
8 years, 10 months ago (2012-02-07 23:21:31 UTC) #14
Randy Smith (Not in Mondays)
Actually, I've decided I'm feeling a bit paranoid about approving changes to content/public, at least ...
8 years, 10 months ago (2012-02-07 23:39:42 UTC) #15
jam
On 2012/02/07 23:39:42, rdsmith wrote: > Actually, I've decided I'm feeling a bit paranoid about ...
8 years, 10 months ago (2012-02-07 23:54:36 UTC) #16
ahendrickson
jam, PTAL at content/browser/tab_contents/* as well. http://codereview.chromium.org/9296012/diff/35019/content/browser/download/download_create_info.h File content/browser/download/download_create_info.h (right): http://codereview.chromium.org/9296012/diff/35019/content/browser/download/download_create_info.h#newcode116 content/browser/download/download_create_info.h:116: const net::BoundNetLog bound_net_log; ...
8 years, 10 months ago (2012-02-07 23:58:54 UTC) #17
ahendrickson
mmenke, are you OK with this CL?
8 years, 10 months ago (2012-02-07 23:59:23 UTC) #18
jam
On 2012/02/07 23:58:54, ahendrickson wrote: > jam, PTAL at content/browser/tab_contents/* as well. lgtm
8 years, 10 months ago (2012-02-08 00:02:01 UTC) #19
mmenke
LGTM http://codereview.chromium.org/9296012/diff/34003/content/browser/download/download_file_impl.h File content/browser/download/download_file_impl.h (right): http://codereview.chromium.org/9296012/diff/34003/content/browser/download/download_file_impl.h#newcode1 content/browser/download/download_file_impl.h:1: // Copyright (c) 2011 The Chromium Authors. All ...
8 years, 10 months ago (2012-02-08 16:03:45 UTC) #20
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/ahendrickson@chromium.org/9296012/42003
8 years, 10 months ago (2012-02-08 18:15:57 UTC) #21
ahendrickson
http://codereview.chromium.org/9296012/diff/34003/content/browser/download/download_file_impl.h File content/browser/download/download_file_impl.h (right): http://codereview.chromium.org/9296012/diff/34003/content/browser/download/download_file_impl.h#newcode1 content/browser/download/download_file_impl.h:1: // Copyright (c) 2011 The Chromium Authors. All rights ...
8 years, 10 months ago (2012-02-08 18:16:10 UTC) #22
commit-bot: I haz the power
Change committed as 121050
8 years, 10 months ago (2012-02-08 21:48:11 UTC) #23
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/ahendrickson@chromium.org/9296012/42003
8 years, 10 months ago (2012-02-09 03:51:19 UTC) #24
commit-bot: I haz the power
8 years, 10 months ago (2012-02-09 05:08:12 UTC) #25
Change committed as 121195

Powered by Google App Engine
This is Rietveld 408576698