|
Fix and re-commit http://codereview.chromium.org/10914109/ (after revert in http://crrev.com/155918) -- Refactoring and tests for the highly undertested file_util::CreateOrUpdateShortcutLink() method.
Simplify file_util::CreateOrUpdateShortcutLink()'s interface (use a struct to set parameters passed which allows callers to specify exactly what they want without having to pass in a bunch of NULLs for the unused parameters).
The same concept will be used for ShellUtil's shortcut functions in an upcoming CL.
Moved ShellUtil::VerifyChromeShortcut() to file_util::VerifyShortcut() and augmented it for every shortcut properties. This will also allow other shortcut creators (web apps, profiles, etc.) to have a broader test coverage on the shortcut they create (i.e. more testable properties available).
I will leave it up to the owners of these various projects to augment their tests, this CL keeps the previously tested behavior, not more, not less.
This is the 1st CL of a massive refactoring effort for shortcuts ( http://goo.gl/Az889) in which ShellUtil's shortcut methods have to be refactored ( http://codereview.chromium.org/10836247/ : soon to incorporate interface changes from this CL) which led me even lower to first refactor file_util's shortcut methods.
TBR=robertshield@chromium.org, sky@chromium.org, agl@chromium.org, dgrogan@chromium.org
BUG= 132825, 148539
TEST=base_unittests --gtest_filter=FileUtilShortcutTest*
installer_util_unitests --gtest_filter=ShellUtilTestWithDirAndDist*
unit_tests --gtest_filter=ProfileShortcutManagerTest*
(run tests on XP as well)
Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=156250
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+918 lines, -469 lines) |
Patch |
 |
M |
base/base.gyp
|
View
|
1
|
3 chunks |
+14 lines, -0 lines |
0 comments
|
Download
|
 |
M |
base/base.gypi
|
View
|
|
1 chunk |
+2 lines, -0 lines |
0 comments
|
Download
|
 |
M |
base/file_util.h
|
View
|
|
1 chunk |
+0 lines, -51 lines |
0 comments
|
Download
|
 |
M |
base/file_util_unittest.cc
|
View
|
|
1 chunk |
+0 lines, -69 lines |
0 comments
|
Download
|
 |
M |
base/file_util_win.cc
|
View
|
|
3 chunks |
+0 lines, -155 lines |
0 comments
|
Download
|
 |
A |
base/test/test_shortcut_win.h
|
View
|
|
1 chunk |
+38 lines, -0 lines |
0 comments
|
Download
|
 |
A |
base/test/test_shortcut_win.cc
|
View
|
|
1 chunk |
+142 lines, -0 lines |
0 comments
|
Download
|
 |
A |
base/win/shortcut.h
|
View
|
|
1 chunk |
+142 lines, -0 lines |
0 comments
|
Download
|
 |
A |
base/win/shortcut.cc
|
View
|
|
1 chunk |
+180 lines, -0 lines |
0 comments
|
Download
|
 |
A |
base/win/shortcut_unittest.cc
|
View
|
|
1 chunk |
+221 lines, -0 lines |
0 comments
|
Download
|
 |
M |
base/win/win_util.h
|
View
|
|
1 chunk |
+4 lines, -3 lines |
0 comments
|
Download
|
 |
M |
base/win/win_util.cc
|
View
|
|
1 chunk |
+7 lines, -3 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/profiles/profile_shortcut_manager_unittest_win.cc
|
View
|
|
14 chunks |
+31 lines, -25 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/shell_integration_win.cc
|
View
|
|
2 chunks |
+6 lines, -4 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/ui/web_applications/web_app_ui.cc
|
View
|
|
3 chunks |
+13 lines, -11 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/web_applications/web_app_win.cc
|
View
|
|
7 chunks |
+19 lines, -18 lines |
0 comments
|
Download
|
 |
M |
chrome/installer/setup/install.cc
|
View
|
|
3 chunks |
+10 lines, -7 lines |
0 comments
|
Download
|
 |
M |
chrome/installer/setup/uninstall.cc
|
View
|
|
2 chunks |
+2 lines, -1 line |
0 comments
|
Download
|
 |
M |
chrome/installer/util/shell_util.h
|
View
|
|
1 chunk |
+0 lines, -10 lines |
0 comments
|
Download
|
 |
M |
chrome/installer/util/shell_util.cc
|
View
|
|
3 chunks |
+19 lines, -59 lines |
0 comments
|
Download
|
 |
M |
chrome/installer/util/shell_util_unittest.cc
|
View
|
|
14 chunks |
+61 lines, -51 lines |
0 comments
|
Download
|
 |
M |
net/url_request/url_request_file_job.cc
|
View
|
|
2 chunks |
+5 lines, -1 line |
0 comments
|
Download
|
 |
M |
ui/base/dialogs/select_file_dialog_win.cc
|
View
|
|
2 chunks |
+2 lines, -1 line |
0 comments
|
Download
|
Total messages: 9 (0 generated)
|