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

Issue 6043: Added dangerous download prompting. (Closed)

Created:
12 years, 2 months ago by jcampan
Modified:
9 years, 7 months ago
CC:
chromium-reviews_googlegroups.com, ian fette, Nick Baum (Google), brian
Visibility:
Public.

Description

This CL adds prompting for dangerous types of files (executable) when they are automatically downloaded. The file is saved with a temporary name (dangerous_download_xxxx.download) in the download directory and the user is presented (in the download shelf and the download tab if opened) with a warning message and buttons to save/discard the download. If discarded the download is removed (and its file deleted). If saved, download goes as usual. Dangerous downloads not confirmed by the user are deleted on shutdown. TEST=Download a small exe file, try using the save/discard button from the download shelf and from the download tab (the intent is that the file has been entirely downloaded by the time you take action). Try again with a slow/big download (that time the download is expected not to be finished when approved/discarded). Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=3228

Patch Set 1 #

Patch Set 2 : '' #

Patch Set 3 : '' #

Patch Set 4 : '' #

Patch Set 5 : '' #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1332 lines, -435 lines) Patch
M base/file_util.h View 1 2 3 1 chunk +4 lines, -0 lines 0 comments Download
M base/file_util_posix.cc View 1 chunk +7 lines, -0 lines 0 comments Download
M base/file_util_win.cc View 1 chunk +8 lines, -2 lines 0 comments Download
M base/string_util.h View 1 chunk +8 lines, -0 lines 0 comments Download
M base/string_util.cc View 1 2 3 1 chunk +36 lines, -0 lines 0 comments Download
M base/string_util_unittest.cc View 1 2 1 chunk +26 lines, -0 lines 0 comments Download
M chrome/app/generated_resources.grd View 1 2 3 1 chunk +13 lines, -0 lines 0 comments Download
A chrome/app/theme/download_button_right_bottom_no_dd.png View Binary file 0 comments Download
A chrome/app/theme/download_button_right_middle_no_dd.png View Binary file 0 comments Download
A chrome/app/theme/download_button_right_top_no_dd.png View Binary file 0 comments Download
M chrome/app/theme/theme_resources.h View 1 chunk +302 lines, -300 lines 0 comments Download
M chrome/app/theme/theme_resources.rc View 1 chunk +3 lines, -0 lines 0 comments Download
M chrome/browser/download/download_exe.cc View 2 chunks +2 lines, -0 lines 0 comments Download
M chrome/browser/download/download_file.h View 1 1 chunk +3 lines, -0 lines 0 comments Download
M chrome/browser/download/download_file.cc View 1 chunk +6 lines, -0 lines 0 comments Download
M chrome/browser/download/download_manager.h View 1 2 3 10 chunks +73 lines, -6 lines 0 comments Download
M chrome/browser/download/download_manager.cc View 1 2 3 16 chunks +215 lines, -35 lines 1 comment Download
M chrome/browser/download/download_util.cc View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/download/save_package.cc View 2 chunks +3 lines, -3 lines 0 comments Download
M chrome/browser/history/download_database.h View 1 chunk +3 lines, -0 lines 0 comments Download
M chrome/browser/history/download_database.cc View 1 chunk +14 lines, -0 lines 0 comments Download
M chrome/browser/history/download_types.h View 2 chunks +6 lines, -1 line 0 comments Download
M chrome/browser/history/history.h View 1 2 1 chunk +4 lines, -0 lines 0 comments Download
M chrome/browser/history/history.cc View 1 2 1 chunk +6 lines, -0 lines 0 comments Download
M chrome/browser/history/history_backend.h View 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/history/history_backend.cc View 1 chunk +7 lines, -0 lines 0 comments Download
M chrome/browser/resource_dispatcher_host.cc View 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/views/download_item_view.h View 7 chunks +44 lines, -3 lines 0 comments Download
M chrome/browser/views/download_item_view.cc View 1 2 3 17 chunks +309 lines, -58 lines 0 comments Download
M chrome/browser/views/download_tab_view.h View 1 2 3 6 chunks +27 lines, -3 lines 0 comments Download
M chrome/browser/views/download_tab_view.cc View 1 2 3 23 chunks +177 lines, -13 lines 0 comments Download
M chrome/views/native_button.h View 1 2 3 2 chunks +8 lines, -0 lines 0 comments Download
M chrome/views/native_button.cc View 1 3 chunks +15 lines, -10 lines 0 comments Download

Messages

Total messages: 8 (0 generated)
jcampan
12 years, 2 months ago (2008-10-01 18:38:24 UTC) #1
jcampan
12 years, 2 months ago (2008-10-01 21:14:10 UTC) #2
willdye_gmail.com
I'm concerned that this feature will clutter up the base code with anti-malware heuristics. Such ...
12 years, 2 months ago (2008-10-01 22:11:33 UTC) #3
Paul Godavari
http://codereview.chromium.org/6043/diff/69/268 File base/file_util.h (right): http://codereview.chromium.org/6043/diff/69/268#newcode221 Line 221: // Same as CreateTemporaryFileName bu the file is ...
12 years, 2 months ago (2008-10-07 01:29:17 UTC) #4
jcampan
New snapshot uploaded. Thanks. http://codereview.chromium.org/6043/diff/69/268 File base/file_util.h (right): http://codereview.chromium.org/6043/diff/69/268#newcode221 Line 221: // Same as CreateTemporaryFileName ...
12 years, 2 months ago (2008-10-07 21:28:33 UTC) #5
Paul Godavari
LGTM. http://codereview.chromium.org/6043/diff/69/286 File chrome/browser/download/download_manager.h (right): http://codereview.chromium.org/6043/diff/69/286#newcode462 Line 462: bool IsDangerous(const std::wstring& file_name); You're right, I ...
12 years, 2 months ago (2008-10-09 23:47:54 UTC) #6
developer0420
Microsoft also lists the extension .asx (Windows Media Audio / Video) as potentially dangerous extension, ...
12 years, 2 months ago (2008-10-10 01:30:09 UTC) #7
Mark Larson
12 years, 2 months ago (2008-10-10 20:48:17 UTC) #8
http://codereview.chromium.org/6043/diff/639/465
File chrome/browser/download/download_manager.cc (right):

http://codereview.chromium.org/6043/diff/639/465#newcode548
Line 548: SStringPrintf(&file_name, L"dangerous_download_%d.download",
Let's not use DANGER! DANGER! for these files. The name should not be alarming.

We should use something like unconfirmed_%d.download.

Someone with more user sympathy might have a better idea.

Powered by Google App Engine
This is Rietveld 408576698