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

Side by Side Diff: base/base_paths_posix.cc

Issue 8567001: rename some base _linux files to _posix so that others can use it too (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: s/c/cc/g and order Created 9 years, 1 month 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_linux.cc ('k') | base/native_library_linux.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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 13 matching lines...) Expand all
24 #endif 24 #endif
25 25
26 namespace base { 26 namespace base {
27 27
28 #if defined(OS_LINUX) 28 #if defined(OS_LINUX)
29 const char kSelfExe[] = "/proc/self/exe"; 29 const char kSelfExe[] = "/proc/self/exe";
30 #endif 30 #endif
31 31
32 // The name of this file relative to the source root. This is used for checking 32 // The name of this file relative to the source root. This is used for checking
33 // that the source checkout is in the correct place. 33 // that the source checkout is in the correct place.
34 static const char kThisSourceFile[] = "base/base_paths_linux.cc"; 34 static const char kThisSourceFile[] = "base/base_paths_posix.cc";
35 35
36 bool PathProviderPosix(int key, FilePath* result) { 36 bool PathProviderPosix(int key, FilePath* result) {
37 FilePath path; 37 FilePath path;
38 switch (key) { 38 switch (key) {
39 case base::FILE_EXE: 39 case base::FILE_EXE:
40 case base::FILE_MODULE: { // TODO(evanm): is this correct? 40 case base::FILE_MODULE: { // TODO(evanm): is this correct?
41 #if defined(OS_LINUX) 41 #if defined(OS_LINUX)
42 FilePath bin_dir; 42 FilePath bin_dir;
43 if (!file_util::ReadSymbolicLink(FilePath(kSelfExe), &bin_dir)) { 43 if (!file_util::ReadSymbolicLink(FilePath(kSelfExe), &bin_dir)) {
44 NOTREACHED() << "Unable to resolve " << kSelfExe << "."; 44 NOTREACHED() << "Unable to resolve " << kSelfExe << ".";
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 scoped_ptr<base::Environment> env(base::Environment::Create()); 126 scoped_ptr<base::Environment> env(base::Environment::Create());
127 FilePath cache_dir(base::nix::GetXDGDirectory(env.get(), "XDG_CACHE_HOME", 127 FilePath cache_dir(base::nix::GetXDGDirectory(env.get(), "XDG_CACHE_HOME",
128 ".cache")); 128 ".cache"));
129 *result = cache_dir; 129 *result = cache_dir;
130 return true; 130 return true;
131 } 131 }
132 return false; 132 return false;
133 } 133 }
134 134
135 } // namespace base 135 } // namespace base
OLDNEW
« no previous file with comments | « base/base_paths_linux.cc ('k') | base/native_library_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698