Fix building on OS X
authorCheng Zhao <zcbenz@gmail.com>
Fri, 13 Nov 2015 05:03:00 +0000 (13:03 +0800)
committerCheng Zhao <zcbenz@gmail.com>
Fri, 13 Nov 2015 05:03:00 +0000 (13:03 +0800)
chromium_src/chrome/common/chrome_constants.cc
chromium_src/chrome/common/chrome_constants.h
chromium_src/chrome/common/chrome_paths_mac.mm

index 1e7bd33..43a6ccd 100644 (file)
@@ -3,10 +3,16 @@
 // found in the LICENSE file.
 
 #include "chrome/common/chrome_constants.h"
-#include "chrome/common/chrome_version.h"
+
+#define FPL FILE_PATH_LITERAL
 
 namespace chrome {
 
+#if defined(OS_MACOSX)
+const base::FilePath::CharType kFrameworkName[] =
+    FPL(ATOM_PRODUCT_NAME " Framework.framework");
+#endif  // OS_MACOSX
+
 // filenames
 const base::FilePath::CharType kCacheDirname[] = FPL("Cache");
 const base::FilePath::CharType kChannelIDFilename[] = FPL("Origin Bound Certs");
index e36eeee..2df506a 100644 (file)
 
 namespace chrome {
 
+#if defined(OS_MACOSX)
+// NOTE: if you change the value of kFrameworkName, please don't forget to
+// update components/test/run_all_unittests.cc as well.
+// TODO(tfarina): Remove the comment above, when you fix components to use plist
+// on Mac.
+extern const base::FilePath::CharType kFrameworkName[];
+#endif  // OS_MACOSX
+
 // filenames
 extern const base::FilePath::CharType kCacheDirname[];
 extern const base::FilePath::CharType kChannelIDFilename[];
index 09cf13b..4a4eb87 100644 (file)
@@ -179,10 +179,9 @@ base::FilePath GetVersionedDirectory() {
     // .app's versioned directory.  Go up two steps to get to the browser
     // .app's versioned directory.
     path = path.DirName().DirName();
-    DCHECK_EQ(path.BaseName().value(), kChromeVersion);
   } else {
     // Go into the versioned directory.
-    path = path.Append("Versions").Append(kChromeVersion);
+    path = path.Append("Frameworks");
   }
 
   return path;