DescriptionRefactoring 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.
BUG=132825
TEST=base_unittests --gtest_filter=FileUtilShortcutTest*
installer_util_unitests --gtest_filter=ShellUtilTestWithDirAndDist*
unit_tests --gtest_filter=ProfileShortcutManagerTest*
Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=155869
Patch Set 1 : #
Total comments: 20
Patch Set 2 : initial nits #Patch Set 3 : Rebase on r155144 #Patch Set 4 : always use both LongPathName and ShortPathName when verifying paths #
Total comments: 2
Patch Set 5 : address robert's comments #Patch Set 6 : better path matching #
Total comments: 2
Patch Set 7 : Move all Windows shortcut methods to base::win:: #Patch Set 8 : string16 to FilePath where appropriate #
Total comments: 2
Patch Set 9 : namespace s/Win/win #
Messages
Total messages: 21 (0 generated)
|