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

Unified Diff: base/base_paths_mac.mm

Issue 8585029: Make GetWebKitRootDirFilePath smarter about where the WebKit root is relative to the chromium root (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/base_paths_mac.mm
diff --git a/base/base_paths_mac.mm b/base/base_paths_mac.mm
index a9cd471b7516b145163fa530f396c3b33b909a2b..a0c82b6983efe5cb19d14070a27f548edec93983 100644
--- a/base/base_paths_mac.mm
+++ b/base/base_paths_mac.mm
@@ -18,6 +18,10 @@
namespace {
+// The name of this file relative to the source root. This is used for checking
+// that the source checkout is in the correct place.
+static const char kThisSourceFile[] = "base/base_paths_mac.mm";
+
bool GetNSExecutablePath(FilePath* path) WARN_UNUSED_RESULT;
bool GetNSExecutablePath(FilePath* path) {
@@ -82,6 +86,11 @@ bool PathProviderMac(int key, FilePath* result) {
// Unit tests execute two levels deep from the source root, eg:
// src/xcodebuild/{Debug|Release}/base_unittests
*result = result->DirName().DirName();
+ // In a case of a WebKit-only checkout, using make instead of
+ // xcodebuild, we should return <root of
+ // checkout>/Source/WebKit/chromium.
+ if (!file_util::PathExists(result->Append(kThisSourceFile)))
+ *result = result->Append("Source/WebKit/chromium");
Nico 2011/11/17 14:54:11 Do you know why this is necessary? Does the make b
}
return true;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698