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

Side by Side Diff: base/base_paths_posix.cc

Issue 10700136: Prettify output from chrome.fileSystem.getDisplayPath for POSIX profile directories (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Includes specific fix for Mac OS X, which was excluded from the posix code specifically Created 8 years, 5 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
« no previous file with comments | « base/base_paths_mac.mm ('k') | base/file_util_posix.cc » ('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 "base/base_paths.h" 5 #include "base/base_paths.h"
6 6
7 #include <ostream> 7 #include <ostream>
8 #include <string> 8 #include <string>
9 9
10 #include "build/build_config.h" 10 #include "build/build_config.h"
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 // For example: out/{Debug|Release}/net_unittest 78 // For example: out/{Debug|Release}/net_unittest
79 if (PathService::Get(base::DIR_EXE, &path)) { 79 if (PathService::Get(base::DIR_EXE, &path)) {
80 *result = path.DirName().DirName(); 80 *result = path.DirName().DirName();
81 return true; 81 return true;
82 } 82 }
83 83
84 DLOG(ERROR) << "Couldn't find your source root. " 84 DLOG(ERROR) << "Couldn't find your source root. "
85 << "Try running from your chromium/src directory."; 85 << "Try running from your chromium/src directory.";
86 return false; 86 return false;
87 } 87 }
88 case base::DIR_CACHE: 88 case base::DIR_CACHE: {
89 scoped_ptr<base::Environment> env(base::Environment::Create()); 89 scoped_ptr<base::Environment> env(base::Environment::Create());
90 FilePath cache_dir(base::nix::GetXDGDirectory(env.get(), "XDG_CACHE_HOME", 90 FilePath cache_dir(base::nix::GetXDGDirectory(env.get(), "XDG_CACHE_HOME",
91 ".cache")); 91 ".cache"));
92 *result = cache_dir; 92 *result = cache_dir;
93 return true; 93 return true;
94 }
95 case base::DIR_HOME: {
96 *result = file_util::GetHomeDir();
97 return true;
98 }
94 } 99 }
95 return false; 100 return false;
96 } 101 }
97 102
98 } // namespace base 103 } // namespace base
OLDNEW
« no previous file with comments | « base/base_paths_mac.mm ('k') | base/file_util_posix.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698