|
Treat files downloaded from the address bar as "always safe" (including extensions per discussion with asargent and the extensions folks).
This required plumbing the PageTransition::Type from render_view.cc back up through various layers to the download system, as well as adding an extra state qualifier bit on the Type to mark navigations triggered "FROM_ADDRESS_BAR" (since the Type itself sans-qualifier cannot be used to reliably check this).
This also fixes an inconsistency in IsDangerousFile() where "auto-open" lowered our safety checks for Dangerous files but not for AllowOnUserGesture files.
BUG= 87192, 92345
TEST=Paste the PDF link from bug 87192 comment 0 into your address bar and hit enter. The file should download without triggering any warning UI in the download shelf.
Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=98897
Total comments: 10
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+136 lines, -90 lines) |
Patch |
|
M |
chrome/browser/download/chrome_download_manager_delegate.cc
|
View
|
1
2
3
|
3 chunks |
+22 lines, -17 lines |
0 comments
|
Download
|
|
M |
chrome/browser/extensions/extension_webnavigation_api.cc
|
View
|
1
2
3
|
1 chunk |
+2 lines, -0 lines |
0 comments
|
Download
|
|
M |
chrome/browser/extensions/user_script_listener_unittest.cc
|
View
|
1
2
3
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
|
M |
chrome/browser/metrics/metrics_service.cc
|
View
|
1
2
3
|
1 chunk |
+3 lines, -3 lines |
0 comments
|
Download
|
|
M |
chrome/browser/ui/browser_navigator.cc
|
View
|
1
2
3
|
1 chunk |
+7 lines, -2 lines |
0 comments
|
Download
|
|
M |
chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.mm
|
View
|
1
2
3
|
2 chunks |
+2 lines, -2 lines |
0 comments
|
Download
|
|
M |
chrome/browser/ui/gtk/location_bar_view_gtk.cc
|
View
|
1
2
3
|
2 chunks |
+2 lines, -2 lines |
0 comments
|
Download
|
|
M |
chrome/browser/ui/views/location_bar/location_bar_view.cc
|
View
|
1
2
3
|
2 chunks |
+2 lines, -2 lines |
0 comments
|
Download
|
|
M |
chrome/common/extensions/api/extension_api.json
|
View
|
1
2
3
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
chrome/common/extensions/docs/experimental.clear.html
|
View
|
1
2
3
|
2 chunks |
+3 lines, -5 lines |
0 comments
|
Download
|
|
M |
content/browser/download/download_create_info.h
|
View
|
1
2
3
|
3 chunks |
+5 lines, -1 line |
0 comments
|
Download
|
|
M |
content/browser/download/download_create_info.cc
|
View
|
1
2
3
|
3 chunks |
+4 lines, -1 line |
0 comments
|
Download
|
|
M |
content/browser/download/download_item.cc
|
View
|
1
2
3
|
1 chunk |
+3 lines, -2 lines |
0 comments
|
Download
|
|
M |
content/browser/download/download_resource_handler.cc
|
View
|
1
2
3
|
1 chunk |
+4 lines, -7 lines |
0 comments
|
Download
|
|
M |
content/browser/download/download_state_info.h
|
View
|
1
2
3
|
3 chunks |
+4 lines, -0 lines |
0 comments
|
Download
|
|
M |
content/browser/download/download_state_info.cc
|
View
|
1
2
3
|
4 chunks |
+4 lines, -0 lines |
0 comments
|
Download
|
|
M |
content/browser/renderer_host/resource_dispatcher_host.h
|
View
|
1
2
3
|
2 chunks |
+5 lines, -6 lines |
0 comments
|
Download
|
|
M |
content/browser/renderer_host/resource_dispatcher_host.cc
|
View
|
1
2
3
|
5 chunks |
+5 lines, -6 lines |
0 comments
|
Download
|
|
M |
content/browser/renderer_host/resource_dispatcher_host_request_info.h
|
View
|
1
2
3
|
4 chunks |
+5 lines, -0 lines |
0 comments
|
Download
|
|
M |
content/browser/renderer_host/resource_dispatcher_host_request_info.cc
|
View
|
1
2
3
|
2 chunks |
+2 lines, -0 lines |
0 comments
|
Download
|
|
M |
content/browser/renderer_host/resource_dispatcher_host_unittest.cc
|
View
|
1
2
3
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
|
M |
content/browser/renderer_host/resource_queue_unittest.cc
|
View
|
1
2
3
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
|
M |
content/common/page_transition_types.h
|
View
|
1
2
3
|
1 chunk |
+3 lines, -0 lines |
0 comments
|
Download
|
|
M |
content/common/request_extra_data.h
|
View
|
1
2
3
|
1 chunk |
+8 lines, -4 lines |
0 comments
|
Download
|
|
M |
content/common/request_extra_data.cc
|
View
|
1
2
3
|
1 chunk |
+7 lines, -4 lines |
0 comments
|
Download
|
|
M |
content/common/resource_dispatcher.cc
|
View
|
1
2
3
|
1 chunk |
+3 lines, -1 line |
0 comments
|
Download
|
|
M |
content/common/resource_dispatcher_unittest.cc
|
View
|
1
2
3
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
content/common/resource_messages.h
|
View
|
1
2
3
|
2 chunks |
+3 lines, -0 lines |
0 comments
|
Download
|
|
M |
content/renderer/render_view.cc
|
View
|
1
2
3
|
3 chunks |
+21 lines, -19 lines |
0 comments
|
Download
|
Total messages: 19 (0 generated)
|