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

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: 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
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 = FilePath(file_util::GetHomeDir());
benwells 2012/07/11 00:02:03 Can this just be: *result = file_util::GetHomeDir(
thorogood 2012/07/11 00:30:24 Done.
97 return true;
94 } 98 }
95 return false; 99 return false;
96 } 100 }
97 101
98 } // namespace base 102 } // namespace base
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698