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

Issue 10910209: Add new PathService paths for Windows' All Users Desktop and Quick Launch folders. (Closed)

Created:
8 years, 3 months ago by gab
Modified:
8 years, 3 months ago
CC:
chromium-reviews, grt+watch_chromium.org, robertshield, Halli, rpetterson
Visibility:
Public.

Description

Add new PathService paths for Windows' All Users Desktop and Quick Launch folders. This allows usage of PathService to cache the paths and more importantly to mock them in shortcut tests! Also move chrome::DIR_USER_DESKTOP to base::DIR_USER_DESKTOP; this is really where it belongs. In fact it is only in chrome_paths.h because it used to be called DIR_DEFAULT_DOWNLOAD and cpu@ renamed it to DIR_USER_DESKTOP in http://crrev.com/1753 (early days!) after that it started to be used all over the place as the Desktop path. Finally bringing it to base_paths.h, beside DIR_START_MENU and friends, is the right thing to do imo. BUG=148539 TEST=Quick Launch shortcut installed in the right place on XP (both Default and current user) Desktop shortcuts installed in the right place (both All Users and per-user installs). installer_util_unittests.exe --gtest_filter=ShellUtilShortcutTest* unit_tests.exe --gtest_filter=ProfileShortcutManagerTest* base_unittests --gtest_filter=PathServiceTest* Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=157667

Patch Set 1 #

Patch Set 2 : #

Total comments: 3

Patch Set 3 : fix tests compile + rebase on r156593 #

Patch Set 4 : Fix mac compile #

Total comments: 3

Patch Set 5 : Fix compile linux and android #

Patch Set 6 : Fix compile posix #

Patch Set 7 : Fix compile path_service.cc #

Patch Set 8 : More compile tweaks #

Patch Set 9 : More compile tweaks #

Patch Set 10 : special case DIR_USER_DESKTOP for OS_LINUX in path_service_unittest.cc #

Patch Set 11 : merge up to r156593 #

Patch Set 12 : Fix compile post-merge #

Total comments: 10

Patch Set 13 : Rename base_paths_posix.cc to base_paths_default_posix.cc and only include base/base_paths.h #

Patch Set 14 : Do not modify so many files just to include base_paths.h which is transitively included from path_s… #

Patch Set 15 : Try to fix git cl upload #

Total comments: 6

Patch Set 16 : nits from brettw #

Total comments: 24

Patch Set 17 : base/base_paths_default_posix.cc -> base/base_paths_posix.cc #

Patch Set 18 : greg's nits #

Patch Set 19 : addressing grt's last comments #

Patch Set 20 : oops #

Total comments: 6

Patch Set 21 : Adjust links to pass presubmit #

Unified diffs Side-by-side diffs Delta from patch set Stats (+215 lines, -152 lines) Patch
M base/base.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +1 line, -0 lines 0 comments Download
M base/base_paths.h View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +5 lines, -11 lines 0 comments Download
M base/base_paths.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +1 line, -1 line 0 comments Download
M base/base_paths_android.h View 1 1 chunk +1 line, -0 lines 0 comments Download
M base/base_paths_android.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 2 chunks +15 lines, -17 lines 0 comments Download
M base/base_paths_mac.mm View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 5 chunks +10 lines, -7 lines 0 comments Download
A base/base_paths_posix.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +29 lines, -0 lines 0 comments Download
M base/base_paths_posix.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 4 chunks +9 lines, -4 lines 0 comments Download
M base/base_paths_win.h View 1 1 chunk +6 lines, -0 lines 0 comments Download
M base/base_paths_win.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 4 chunks +57 lines, -3 lines 0 comments Download
M base/path_service.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 3 chunks +6 lines, -4 lines 0 comments Download
M base/path_service_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 4 chunks +27 lines, -9 lines 0 comments Download
M chrome/browser/download/download_util.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/profiles/profile_shortcut_manager_unittest_win.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 3 chunks +8 lines, -2 lines 0 comments Download
M chrome/browser/shell_integration_linux.cc View 1 4 chunks +3 lines, -4 lines 0 comments Download
M chrome/browser/shell_integration_win.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +1 line, -2 lines 0 comments Download
M chrome/browser/ui/views/test/ui_test_utils_win.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +1 line, -2 lines 0 comments Download
M chrome/browser/ui/web_applications/web_app_ui.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +1 line, -2 lines 0 comments Download
M chrome/browser/web_applications/web_app_win.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +1 line, -2 lines 0 comments Download
M chrome/common/chrome_paths.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +0 lines, -1 line 0 comments Download
M chrome/common/chrome_paths.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +0 lines, -4 lines 0 comments Download
M chrome/common/chrome_paths_android.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +0 lines, -5 lines 0 comments Download
M chrome/common/chrome_paths_internal.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +0 lines, -3 lines 0 comments Download
M chrome/common/chrome_paths_linux.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +2 lines, -6 lines 0 comments Download
M chrome/common/chrome_paths_mac.mm View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +0 lines, -4 lines 0 comments Download
M chrome/common/chrome_paths_win.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +0 lines, -4 lines 0 comments Download
M chrome/installer/util/shell_util.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 1 chunk +6 lines, -34 lines 0 comments Download
M chrome/installer/util/shell_util_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 7 chunks +24 lines, -20 lines 0 comments Download

Messages

Total messages: 26 (0 generated)
gab
This looks like a big CL, but it really isn't!! It's adding 3 path enums ...
8 years, 3 months ago (2012-09-13 23:16:50 UTC) #1
gab
@hallielaine, rlp: FYI, this makes ProfileShortcutManagerTests (and ShellUtilShortcutTests) finally create shortcuts in a mock Desktop ...
8 years, 3 months ago (2012-09-13 23:22:30 UTC) #2
satorux1
webkit/chromeos/fileapi/cros_mount_point_provider.cc LGTM http://codereview.chromium.org/10910209/diff/1007/webkit/chromeos/fileapi/cros_mount_point_provider.cc File webkit/chromeos/fileapi/cros_mount_point_provider.cc (right): http://codereview.chromium.org/10910209/diff/1007/webkit/chromeos/fileapi/cros_mount_point_provider.cc#newcode7 webkit/chromeos/fileapi/cros_mount_point_provider.cc:7: #include "base/base_paths_posix.h" just curious but why did ...
8 years, 3 months ago (2012-09-13 23:32:32 UTC) #3
gab
@satorux: see below. http://codereview.chromium.org/10910209/diff/1007/webkit/chromeos/fileapi/cros_mount_point_provider.cc File webkit/chromeos/fileapi/cros_mount_point_provider.cc (right): http://codereview.chromium.org/10910209/diff/1007/webkit/chromeos/fileapi/cros_mount_point_provider.cc#newcode7 webkit/chromeos/fileapi/cros_mount_point_provider.cc:7: #include "base/base_paths_posix.h" On 2012/09/13 23:32:32, satorux1 ...
8 years, 3 months ago (2012-09-13 23:40:12 UTC) #4
satorux1
http://codereview.chromium.org/10910209/diff/1007/webkit/chromeos/fileapi/cros_mount_point_provider.cc File webkit/chromeos/fileapi/cros_mount_point_provider.cc (right): http://codereview.chromium.org/10910209/diff/1007/webkit/chromeos/fileapi/cros_mount_point_provider.cc#newcode7 webkit/chromeos/fileapi/cros_mount_point_provider.cc:7: #include "base/base_paths_posix.h" On 2012/09/13 23:40:12, gab wrote: > On ...
8 years, 3 months ago (2012-09-13 23:41:40 UTC) #5
grt (UTC plus 2)
https://chromiumcodereview.appspot.com/10910209/diff/5016/base/base.gypi File base/base.gypi (right): https://chromiumcodereview.appspot.com/10910209/diff/5016/base/base.gypi#newcode65 base/base.gypi:65: 'base_paths_posix.h', move after .cc file to preserve order https://chromiumcodereview.appspot.com/10910209/diff/5016/base/base_paths.h ...
8 years, 3 months ago (2012-09-14 15:35:16 UTC) #6
gab
@grt: done, see comments below. Also removed attempts at including the includes where unnecessary, will ...
8 years, 3 months ago (2012-09-14 18:10:06 UTC) #7
gab
-jochen, satorux, phajdan.jr: I decided not to do the "include-what-you-use" fixup as part of this ...
8 years, 3 months ago (2012-09-14 18:27:24 UTC) #8
grt (UTC plus 2)
On 2012/09/14 18:27:24, gab wrote: > @grt: back to you when time allows :)! Thanks ...
8 years, 3 months ago (2012-09-14 18:44:57 UTC) #9
brettw
http://codereview.chromium.org/10910209/diff/5027/base/base_paths_default_posix.cc File base/base_paths_default_posix.cc (right): http://codereview.chromium.org/10910209/diff/5027/base/base_paths_default_posix.cc#newcode5 base/base_paths_default_posix.cc:5: // Defines base::PathProviderPosix which is the default path provider ...
8 years, 3 months ago (2012-09-14 22:10:05 UTC) #10
gab
nits adressed, see comment below on why base_paths_default_posix.cc. Thanks, Gab http://codereview.chromium.org/10910209/diff/5027/base/base_paths_default_posix.cc File base/base_paths_default_posix.cc (right): http://codereview.chromium.org/10910209/diff/5027/base/base_paths_default_posix.cc#newcode5 ...
8 years, 3 months ago (2012-09-16 03:13:51 UTC) #11
brettw
I'd be OK calling the file base_paths_posix.cc as well. default_posix doesn't match anything else we ...
8 years, 3 months ago (2012-09-16 04:25:00 UTC) #12
gab
On 2012/09/16 04:25:00, brettw wrote: > I'd be OK calling the file base_paths_posix.cc as well. ...
8 years, 3 months ago (2012-09-16 15:16:02 UTC) #13
brettw
grt: do you have any further comments? I think base_paths_default_posix is weird. Personally I'd prefer ...
8 years, 3 months ago (2012-09-17 22:30:17 UTC) #14
grt (UTC plus 2)
On 2012/09/17 22:30:17, brettw wrote: > grt: do you have any further comments? I think ...
8 years, 3 months ago (2012-09-18 00:54:56 UTC) #15
grt (UTC plus 2)
looks good. just a smattering of small comments. https://chromiumcodereview.appspot.com/10910209/diff/14108/base/base_paths.cc File base/base_paths.cc (left): https://chromiumcodereview.appspot.com/10910209/diff/14108/base/base_paths.cc#oldcode6 base/base_paths.cc:6: please ...
8 years, 3 months ago (2012-09-19 16:44:46 UTC) #16
gab
Done + 1 comment on comment. https://chromiumcodereview.appspot.com/10910209/diff/14108/base/base_paths.cc File base/base_paths.cc (left): https://chromiumcodereview.appspot.com/10910209/diff/14108/base/base_paths.cc#oldcode6 base/base_paths.cc:6: On 2012/09/19 16:44:46, ...
8 years, 3 months ago (2012-09-19 18:22:58 UTC) #17
grt (UTC plus 2)
lgtm w/ the EXPECT -> ASSERT change discussed offline. https://chromiumcodereview.appspot.com/10910209/diff/14108/base/base_paths_mac.mm File base/base_paths_mac.mm (right): https://chromiumcodereview.appspot.com/10910209/diff/14108/base/base_paths_mac.mm#newcode56 base/base_paths_mac.mm:56: ...
8 years, 3 months ago (2012-09-19 19:12:06 UTC) #18
gab
Done. @brettw: over to you for OWNER approval. Thanks, Gab https://chromiumcodereview.appspot.com/10910209/diff/14108/base/base_paths_mac.mm File base/base_paths_mac.mm (right): https://chromiumcodereview.appspot.com/10910209/diff/14108/base/base_paths_mac.mm#newcode56 ...
8 years, 3 months ago (2012-09-19 19:44:25 UTC) #19
brettw
lgtm
8 years, 3 months ago (2012-09-19 20:53:29 UTC) #20
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/gab@chromium.org/10910209/17007
8 years, 3 months ago (2012-09-19 21:14:55 UTC) #21
commit-bot: I haz the power
Presubmit check for 10910209-17007 failed and returned exit status 1. Running presubmit commit checks ...
8 years, 3 months ago (2012-09-19 21:15:03 UTC) #22
M-A Ruel
http://codereview.chromium.org/10910209/diff/17007/base/base_paths_win.cc File base/base_paths_win.cc (right): http://codereview.chromium.org/10910209/diff/17007/base/base_paths_win.cc#newcode26 base/base_paths_win.cc:26: // http://msdn.microsoft.com/en-us/library/windows/desktop/bb762181(v=vs.85).aspx // http://msdn.microsoft.com/library/windows/desktop/bb762181.aspx works well. http://codereview.chromium.org/10910209/diff/17007/base/base_paths_win.cc#newcode41 base/base_paths_win.cc:41: // ...
8 years, 3 months ago (2012-09-19 21:30:29 UTC) #23
gab
Thanks for the tips M-A. Tweaked the links as described in comments below. http://codereview.chromium.org/10910209/diff/17007/base/base_paths_win.cc File ...
8 years, 3 months ago (2012-09-19 21:38:30 UTC) #24
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/gab@chromium.org/10910209/34008
8 years, 3 months ago (2012-09-19 21:39:26 UTC) #25
commit-bot: I haz the power
8 years, 3 months ago (2012-09-20 00:13:42 UTC) #26
Change committed as 157667

Powered by Google App Engine
This is Rietveld 408576698