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

Unified Diff: base/base_paths_posix.cc

Issue 2865002: Support for DIR_SOURCE_ROOT in a case of WebKit-only checkout.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | base/base_paths_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/base_paths_posix.cc
===================================================================
--- base/base_paths_posix.cc (revision 49756)
+++ base/base_paths_posix.cc (working copy)
@@ -82,6 +82,16 @@
return true;
}
}
+ // In a case of WebKit-only checkout, executable files are put into
+ // WebKit/out/{Debug|Release}, and we should return WebKit/WebKit/chromium
+ // for DIR_SOURCE_ROOT.
+ if (PathService::Get(base::DIR_EXE, &path)) {
+ path = path.DirName().DirName().Append("WebKit/chromium");
+ if (file_util::PathExists(path.Append("base/base_paths_posix.cc"))) {
+ *result = path;
+ return true;
+ }
+ }
// If that failed (maybe the build output is symlinked to a different
// drive) try assuming the current directory is the source root.
if (file_util::GetCurrentDirectory(&path) &&
« no previous file with comments | « no previous file | base/base_paths_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698