|
|
Merge: Be explicit about target type in platform_util::OpenItem()
OpenItem() now takes an OpenItemType parameter that should specify
expected type of the object to be opened. It verifies the type of the
object before invoking platform specific logic for opening the item.
Code that assumed that the target of OpenItem() was always a folder
should now no longer unintentionally open or execute the file at the
target location when this assumption was found to not be correct.
In addition to the checks performed by OpenItem, the platform specific
logic used to open folders fail if the target type is not a directory.
Note: This is a manual merge. Changes to platform_util_unittest.cc were
necessary due to changes to json_string_value_serializer that straddled
the branchpoint.
BUG= 387037
Review URL: https://codereview.chromium.org/352393002
Cr-Commit-Position: refs/heads/master@{#319555}
(cherry picked from commit 655d1118025f1b7d2b0cff9fb465da3a50ad15e9)
TBR=amineer@chromium.org
Committed: https://chromium.googlesource.com/chromium/src/+/a7ffaff98ecbc5127ca4f0b9138da8f4dc548b8a
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+853 lines, -194 lines) |
Patch |
 |
M |
chrome/browser/chromeos/file_manager/fileapi_util.h
|
View
|
|
1 chunk |
+6 lines, -0 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/chromeos/file_manager/fileapi_util.cc
|
View
|
|
2 chunks |
+29 lines, -0 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/chromeos/file_manager/open_util.h
|
View
|
|
2 chunks |
+27 lines, -7 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/chromeos/file_manager/open_util.cc
|
View
|
|
5 chunks |
+58 lines, -72 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/download/chrome_download_manager_delegate.cc
|
View
|
|
1 chunk |
+2 lines, -1 line |
0 comments
|
Download
|
 |
M |
chrome/browser/extensions/api/downloads/downloads_api.cc
|
View
|
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/media_galleries/media_galleries_scan_result_controller.cc
|
View
|
|
1 chunk |
+3 lines, -1 line |
0 comments
|
Download
|
 |
M |
chrome/browser/platform_util.h
|
View
|
|
2 chunks |
+43 lines, -8 lines |
0 comments
|
Download
|
 |
A |
chrome/browser/platform_util.cc
|
View
|
|
1 chunk |
+65 lines, -0 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/platform_util_android.cc
|
View
|
|
1 chunk |
+4 lines, -1 line |
0 comments
|
Download
|
 |
M |
chrome/browser/platform_util_chromeos.cc
|
View
|
|
1 chunk |
+71 lines, -6 lines |
0 comments
|
Download
|
 |
A |
chrome/browser/platform_util_internal.h
|
View
|
|
1 chunk |
+29 lines, -0 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/platform_util_linux.cc
|
View
|
|
3 chunks |
+35 lines, -25 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/platform_util_mac.mm
|
View
|
|
9 chunks |
+34 lines, -8 lines |
0 comments
|
Download
|
 |
A |
chrome/browser/platform_util_unittest.cc
|
View
|
|
1 chunk |
+300 lines, -0 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/platform_util_win.cc
|
View
|
|
5 chunks |
+45 lines, -23 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/ui/ash/chrome_screenshot_grabber.cc
|
View
|
|
2 chunks |
+2 lines, -5 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/ui/webui/downloads_dom_handler.cc
|
View
|
|
1 chunk |
+2 lines, -1 line |
0 comments
|
Download
|
 |
M |
chrome/chrome_browser.gypi
|
View
|
|
2 chunks |
+2 lines, -0 lines |
0 comments
|
Download
|
 |
M |
chrome/chrome_tests_unit.gypi
|
View
|
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
 |
M |
chrome/common/chrome_utility_messages.h
|
View
|
|
1 chunk |
+6 lines, -1 line |
0 comments
|
Download
|
 |
M |
chrome/utility/shell_handler_win.h
|
View
|
|
1 chunk |
+2 lines, -1 line |
0 comments
|
Download
|
 |
M |
chrome/utility/shell_handler_win.cc
|
View
|
|
2 chunks |
+10 lines, -4 lines |
0 comments
|
Download
|
 |
M |
ui/base/win/shell.h
|
View
|
|
1 chunk |
+20 lines, -7 lines |
0 comments
|
Download
|
 |
M |
ui/base/win/shell.cc
|
View
|
|
3 chunks |
+55 lines, -21 lines |
0 comments
|
Download
|
Total messages: 2 (1 generated)
|