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

Side by Side Diff: chrome/common/chrome_paths_linux.cc

Issue 10958009: Revert 157667 - Add new PathService paths for Windows' All Users Desktop and Quick Launch folders. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/common/chrome_paths_internal.h ('k') | chrome/common/chrome_paths_mac.mm » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/common/chrome_paths_internal.h" 5 #include "chrome/common/chrome_paths_internal.h"
6 6
7 #include "base/environment.h" 7 #include "base/environment.h"
8 #include "base/file_util.h" 8 #include "base/file_util.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/nix/xdg_util.h" 10 #include "base/nix/xdg_util.h"
(...skipping 19 matching lines...) Expand all
30 FilePath* result) { 30 FilePath* result) {
31 #if defined(OS_CHROMEOS) 31 #if defined(OS_CHROMEOS)
32 // No local media directories on CrOS. 32 // No local media directories on CrOS.
33 return false; 33 return false;
34 #else 34 #else
35 *result = GetXDGUserDirectory(xdg_name.c_str(), fallback_name.c_str()); 35 *result = GetXDGUserDirectory(xdg_name.c_str(), fallback_name.c_str());
36 36
37 FilePath home = file_util::GetHomeDir(); 37 FilePath home = file_util::GetHomeDir();
38 if (*result != home) { 38 if (*result != home) {
39 FilePath desktop; 39 FilePath desktop;
40 if (!PathService::Get(base::DIR_USER_DESKTOP, &desktop)) 40 GetUserDesktop(&desktop);
41 return false;
42 if (*result != desktop) { 41 if (*result != desktop) {
43 return true; 42 return true;
44 } 43 }
45 } 44 }
46 45
47 *result = home.Append(fallback_name); 46 *result = home.Append(fallback_name);
48 return true; 47 return true;
49 #endif 48 #endif
50 } 49 }
51 50
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 bool GetUserPicturesDirectory(FilePath* result) { 135 bool GetUserPicturesDirectory(FilePath* result) {
137 return GetUserMediaDirectory("PICTURES", kPicturesDir, result); 136 return GetUserMediaDirectory("PICTURES", kPicturesDir, result);
138 } 137 }
139 138
140 // We respect the user's preferred pictures location, unless it is 139 // We respect the user's preferred pictures location, unless it is
141 // ~ or their desktop directory, in which case we default to ~/Videos. 140 // ~ or their desktop directory, in which case we default to ~/Videos.
142 bool GetUserVideosDirectory(FilePath* result) { 141 bool GetUserVideosDirectory(FilePath* result) {
143 return GetUserMediaDirectory("VIDEOS", kVideosDir, result); 142 return GetUserMediaDirectory("VIDEOS", kVideosDir, result);
144 } 143 }
145 144
145 bool GetUserDesktop(FilePath* result) {
146 *result = GetXDGUserDirectory("DESKTOP", "Desktop");
147 return true;
148 }
149
146 bool ProcessNeedsProfileDir(const std::string& process_type) { 150 bool ProcessNeedsProfileDir(const std::string& process_type) {
147 // For now we have no reason to forbid this on Linux as we don't 151 // For now we have no reason to forbid this on Linux as we don't
148 // have the roaming profile troubles there. Moreover the Linux breakpad needs 152 // have the roaming profile troubles there. Moreover the Linux breakpad needs
149 // profile dir access in all process if enabled on Linux. 153 // profile dir access in all process if enabled on Linux.
150 return true; 154 return true;
151 } 155 }
152 156
153 } // namespace chrome 157 } // namespace chrome
OLDNEW
« no previous file with comments | « chrome/common/chrome_paths_internal.h ('k') | chrome/common/chrome_paths_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698