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

Issue 10909171: Fix and re-commit -- Refactoring and tests for file_util::CreateOrUpdateShortcutLink (Closed)

Created:
8 years, 3 months ago by gab
Modified:
8 years, 3 months ago
CC:
chromium-reviews, grt+watch_chromium.org, cbentzel+watch_chromium.org, erikwright+watch_chromium.org, darin-cc_chromium.org, grt (UTC plus 2)
Visibility:
Public.

Description

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

Patch Set 1 #

Patch Set 2 : Delay load propsys.dll for exes that depend on test_support_base as it doesn't exist on WinXP #

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

Messages

Total messages: 9 (0 generated)
gab
@brettw: Small gyp fix to Delay load propsys.dll for exes that depend on test_support_base as ...
8 years, 3 months ago (2012-09-11 19:23:45 UTC) #1
brettw
I'm a bit concerned about code in base that will crash if its called on ...
8 years, 3 months ago (2012-09-11 19:26:42 UTC) #2
gab1
On 2012/09/11 19:26:42, brettw wrote: > I'm a bit concerned about code in base that ...
8 years, 3 months ago (2012-09-11 19:32:17 UTC) #3
brettw
Oh, I see. LGTM
8 years, 3 months ago (2012-09-11 19:33:45 UTC) #4
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/gab@chromium.org/10909171/2001
8 years, 3 months ago (2012-09-11 19:35:00 UTC) #5
commit-bot: I haz the power
Try job failure for 10909171-2001 (retry) on win for step "compile" (clobber build). It's a ...
8 years, 3 months ago (2012-09-11 20:40:23 UTC) #6
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/gab@chromium.org/10909171/2001
8 years, 3 months ago (2012-09-11 20:55:15 UTC) #7
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/gab@chromium.org/10909171/2001
8 years, 3 months ago (2012-09-12 02:45:39 UTC) #8
commit-bot: I haz the power
8 years, 3 months ago (2012-09-12 07:14:57 UTC) #9
Change committed as 156250

Powered by Google App Engine
This is Rietveld 408576698