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

Issue 7065015: For downloads requiring a user gesture, also require... (Closed)

Created:
9 years, 7 months ago by Peter Kasting
Modified:
9 years, 7 months ago
CC:
chromium-reviews, Paweł Hajdan Jr., darin-cc_chromium.org, rdsmith+dwatch_chromium.org, brettw-cc_chromium.org
Visibility:
Public.

Description

For downloads requiring a user gesture, also require the user to have visited the site before today, to hamper attackers. BUG=81741 TEST=.exe downloads on Windows triggered by an explicit link click should prompt you to confirm iff they are hosted on a site you have not visited before today. Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=86518

Patch Set 1 #

Patch Set 2 : '' #

Total comments: 12

Patch Set 3 : '' #

Unified diffs Side-by-side diffs Delta from patch set Stats (+111 lines, -57 lines) Patch
M chrome/browser/download/download_create_info.h View 1 chunk +0 lines, -6 lines 0 comments Download
M chrome/browser/download/download_create_info.cc View 2 chunks +0 lines, -4 lines 0 comments Download
M chrome/browser/download/download_history.h View 1 2 5 chunks +21 lines, -0 lines 0 comments Download
M chrome/browser/download/download_history.cc View 7 chunks +33 lines, -5 lines 0 comments Download
M chrome/browser/download/download_item.h View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/download/download_item.cc View 1 2 3 chunks +11 lines, -4 lines 0 comments Download
M chrome/browser/download/download_manager.h View 1 2 3 chunks +7 lines, -3 lines 0 comments Download
M chrome/browser/download/download_manager.cc View 1 2 6 chunks +24 lines, -8 lines 0 comments Download
M chrome/browser/download/download_manager_unittest.cc View 1 2 6 chunks +14 lines, -24 lines 0 comments Download
M chrome/browser/download/download_state_info.cc View 1 2 1 chunk +0 lines, -1 line 0 comments Download
M chrome/browser/renderer_host/download_resource_handler.cc View 1 chunk +0 lines, -2 lines 0 comments Download

Messages

Total messages: 4 (0 generated)
Peter Kasting
9 years, 7 months ago (2011-05-24 01:39:16 UTC) #1
Randy Smith (Not in Mondays)
Initial round of review. My primary comment is around the fork/join semantics, but a couple ...
9 years, 7 months ago (2011-05-24 18:28:25 UTC) #2
Peter Kasting
New snap up. All comments addressed except as noted below. http://codereview.chromium.org/7065015/diff/2004/chrome/browser/download/download_history.cc File chrome/browser/download/download_history.cc (left): http://codereview.chromium.org/7065015/diff/2004/chrome/browser/download/download_history.cc#oldcode55 ...
9 years, 7 months ago (2011-05-24 20:55:00 UTC) #3
Randy Smith (Not in Mondays)
9 years, 7 months ago (2011-05-24 21:48:56 UTC) #4
I think I'm good with this.  LGTM.

http://codereview.chromium.org/7065015/diff/2004/chrome/browser/download/down...
File chrome/browser/download/download_item.h (right):

http://codereview.chromium.org/7065015/diff/2004/chrome/browser/download/down...
chrome/browser/download/download_item.h:280: void SetFileDangerous(bool
dangerous);
On 2011/05/24 20:55:00, Peter Kasting wrote:
> On 2011/05/24 18:28:25, rdsmith wrote:
> > This accessor doesn't look like it's used outside of tests.  Could we get
rid
> of
> > it?
> 
> You're right that it's only used in tests, but how can I get rid of it?  Do
you
> want me to add friend declarations to this class?

You could use SetFileCheckResults based on a DownloadStateInfo structure; that's
the way that it gets set in normal processing.  But that would probably take
some re-working of the test, and I think the reason for this accessor is that
you're getting rid of superfluous members in DownloadCreateInfo, which is gravy
from my point of view even with the extra accessor in DownloadItem, so don't
worry about it unless you feel an urge to do the extra cleanup.

Powered by Google App Engine
This is Rietveld 408576698