diff options
author | wjia@chromium.org <wjia@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-09-20 01:59:36 +0000 |
---|---|---|
committer | wjia@chromium.org <wjia@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-09-20 01:59:36 +0000 |
commit | 1f4ae1659132f11a99e4425efdc517838e21b7ae (patch) | |
tree | d5839b4906f43c1dff10e96f6eaa453d4334f0ae /base/base_paths_posix.cc | |
parent | 5e63aededfd66dd694e68619051153439f0016b1 (diff) | |
download | chromium_src-1f4ae1659132f11a99e4425efdc517838e21b7ae.zip chromium_src-1f4ae1659132f11a99e4425efdc517838e21b7ae.tar.gz chromium_src-1f4ae1659132f11a99e4425efdc517838e21b7ae.tar.bz2 |
Revert 157667 - Add new PathService paths for Windows' All Users Desktop and Quick Launch folders.
The previous patch failed PathServiceTest.Get.
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*
Review URL: https://chromiumcodereview.appspot.com/10910209
TBR=gab@chromium.org
Review URL: https://codereview.chromium.org/10958009
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@157680 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/base_paths_posix.cc')
-rw-r--r-- | base/base_paths_posix.cc | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/base/base_paths_posix.cc b/base/base_paths_posix.cc index 834dee3..95e7585 100644 --- a/base/base_paths_posix.cc +++ b/base/base_paths_posix.cc @@ -2,14 +2,12 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -// Defines base::PathProviderPosix, default path provider on POSIX OSes that -// don't have their own base_paths_OS.cc implementation (i.e. all but Mac and -// Android). +#include "base/base_paths.h" #include <ostream> #include <string> -#include "base/base_paths.h" +#include "build/build_config.h" #include "base/environment.h" #include "base/file_path.h" #include "base/file_util.h" @@ -18,7 +16,6 @@ #include "base/path_service.h" #include "base/process_util.h" #include "base/nix/xdg_util.h" -#include "build/build_config.h" #if defined(OS_FREEBSD) #include <sys/param.h> @@ -99,9 +96,6 @@ bool PathProviderPosix(int key, FilePath* result) { << "Try running from your chromium/src directory."; return false; } - case base::DIR_USER_DESKTOP: - *result = base::nix::GetXDGUserDirectory("DESKTOP", "Desktop"); - return true; case base::DIR_CACHE: { scoped_ptr<base::Environment> env(base::Environment::Create()); FilePath cache_dir(base::nix::GetXDGDirectory(env.get(), "XDG_CACHE_HOME", @@ -109,9 +103,10 @@ bool PathProviderPosix(int key, FilePath* result) { *result = cache_dir; return true; } - case base::DIR_HOME: + case base::DIR_HOME: { *result = file_util::GetHomeDir(); return true; + } } return false; } |