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

Side by Side Diff: base/base_paths_linux.cc

Issue 5535003: scons: excise more scons references from the code base (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 10 years 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 | « no previous file | base/debug/stack_trace_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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 <unistd.h> 7 #include <unistd.h>
8 #if defined(OS_FREEBSD) 8 #if defined(OS_FREEBSD)
9 #include <sys/param.h> 9 #include <sys/param.h>
10 #include <sys/sysctl.h> 10 #include <sys/sysctl.h>
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 path = FilePath(cr_source_root); 69 path = FilePath(cr_source_root);
70 if (file_util::PathExists(path.Append(kThisSourceFile))) { 70 if (file_util::PathExists(path.Append(kThisSourceFile))) {
71 *result = path; 71 *result = path;
72 return true; 72 return true;
73 } else { 73 } else {
74 LOG(WARNING) << "CR_SOURCE_ROOT is set, but it appears to not " 74 LOG(WARNING) << "CR_SOURCE_ROOT is set, but it appears to not "
75 << "point to the correct source root directory."; 75 << "point to the correct source root directory.";
76 } 76 }
77 } 77 }
78 // On POSIX, unit tests execute two levels deep from the source root. 78 // On POSIX, unit tests execute two levels deep from the source root.
79 // For example: sconsbuild/{Debug|Release}/net_unittest 79 // For example: out/{Debug|Release}/net_unittest
80 if (PathService::Get(base::DIR_EXE, &path)) { 80 if (PathService::Get(base::DIR_EXE, &path)) {
81 path = path.DirName().DirName(); 81 path = path.DirName().DirName();
82 if (file_util::PathExists(path.Append(kThisSourceFile))) { 82 if (file_util::PathExists(path.Append(kThisSourceFile))) {
83 *result = path; 83 *result = path;
84 return true; 84 return true;
85 } 85 }
86 } 86 }
87 // In a case of WebKit-only checkout, executable files are put into 87 // In a case of WebKit-only checkout, executable files are put into
88 // WebKit/out/{Debug|Release}, and we should return WebKit/WebKit/chromium 88 // WebKit/out/{Debug|Release}, and we should return WebKit/WebKit/chromium
89 // for DIR_SOURCE_ROOT. 89 // for DIR_SOURCE_ROOT.
(...skipping 19 matching lines...) Expand all
109 scoped_ptr<base::Environment> env(base::Environment::Create()); 109 scoped_ptr<base::Environment> env(base::Environment::Create());
110 FilePath cache_dir(base::nix::GetXDGDirectory(env.get(), "XDG_CACHE_HOME", 110 FilePath cache_dir(base::nix::GetXDGDirectory(env.get(), "XDG_CACHE_HOME",
111 ".cache")); 111 ".cache"));
112 *result = cache_dir; 112 *result = cache_dir;
113 return true; 113 return true;
114 } 114 }
115 return false; 115 return false;
116 } 116 }
117 117
118 } // namespace base 118 } // namespace base
OLDNEW
« no previous file with comments | « no previous file | base/debug/stack_trace_posix.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698