diff options
author | estade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-02-28 01:49:55 +0000 |
---|---|---|
committer | estade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-02-28 01:49:55 +0000 |
commit | c1a9f8d4c169b2eb6b32dc50d20b05f69d73237e (patch) | |
tree | d67d12634f2793e44f48d5f6b660d9f04b081978 /base/path_service.cc | |
parent | 04abd506d6a0ae3c5130bf1e026eadbe3b24ccbf (diff) | |
download | chromium_src-c1a9f8d4c169b2eb6b32dc50d20b05f69d73237e.zip chromium_src-c1a9f8d4c169b2eb6b32dc50d20b05f69d73237e.tar.gz chromium_src-c1a9f8d4c169b2eb6b32dc50d20b05f69d73237e.tar.bz2 |
Instead of appending "Downloads" to the user document directory, let each platform specify its own downloads directory.
On mac this is unimplemented. On windows it remains the user document directory + "\Downloads\", and on linux we attempt to follow their XDG setting, but fall back to ~/Downloads if they have an unsafe value in their XDG setting.
Review URL: http://codereview.chromium.org/28167
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10669 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/path_service.cc')
-rw-r--r-- | base/path_service.cc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/base/path_service.cc b/base/path_service.cc index 56f254c..b47111f 100644 --- a/base/path_service.cc +++ b/base/path_service.cc @@ -165,7 +165,7 @@ bool PathService::Get(int key, FilePath* result) { if (GetFromCache(key, result)) return true; - + FilePath path; // search providers for the requested path @@ -175,15 +175,15 @@ bool PathService::Get(int key, FilePath* result) { while (provider) { if (provider->func(key, &path)) break; - DCHECK(path.value().empty()) << "provider should not have modified path"; + DCHECK(path.empty()) << "provider should not have modified path"; provider = provider->next; } - if (path.value().empty()) + if (path.empty()) return false; AddToCache(key, path); - + *result = path; return true; } |