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

Unified Diff: base/base_paths_win.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 | « base/base_paths_posix.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/base_paths_win.cc
===================================================================
--- base/base_paths_win.cc (revision 49756)
+++ base/base_paths_win.cc (working copy)
@@ -105,12 +105,22 @@
return false;
cur = FilePath(system_buffer);
break;
- case base::DIR_SOURCE_ROOT:
+ case base::DIR_SOURCE_ROOT: {
+ FilePath executableDir;
// On Windows, unit tests execute two levels deep from the source root.
// For example: chrome/{Debug|Release}/ui_tests.exe
- PathService::Get(base::DIR_EXE, &cur);
- cur = cur.DirName().DirName();
+ PathService::Get(base::DIR_EXE, &executableDir);
+ cur = executableDir.DirName().DirName();
+ FilePath checkedPath =
+ cur.Append(FILE_PATH_LITERAL("base/base_paths_win.cc"));
+ if (!file_util::PathExists(checkedPath)) {
+ // Check for WebKit-only checkout. Executable files are put into
+ // WebKit/WebKit/chromium/{Debug|Relese}, and we should return
+ // WebKit/WebKit/chromium.
+ cur = executableDir.DirName();
+ }
break;
+ }
default:
return false;
}
« no previous file with comments | « base/base_paths_posix.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698