Index: base/base_paths_mac.mm |
diff --git a/base/base_paths_mac.mm b/base/base_paths_mac.mm |
index aed3ea8e3eb787de288e1c702fd120e752be91d8..f86043698aeb189e9e25dd951d17091153890e4c 100644 |
--- a/base/base_paths_mac.mm |
+++ b/base/base_paths_mac.mm |
@@ -17,6 +17,9 @@ |
#include "base/string_util.h" |
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"; |
void GetNSExecutablePath(FilePath* path) { |
DCHECK(path); |
@@ -78,6 +81,14 @@ bool PathProviderMac(int key, FilePath* result) { |
// 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. |
+ // TODO(thakis): try to move the xcodebuild directory up two levels. |
+ // http://crbug.com/110455 |
+ if (!file_util::PathExists(result->Append(kThisSourceFile))) |
+ *result = result->Append("Source/WebKit/chromium"); |
darin (slow to review)
2012/01/21 00:18:54
why should src/base know about the directory struc
|
+ CHECK(file_util::PathExists(result->Append(kThisSourceFile))); |
return true; |
} |
default: |