From 05d2e431debde75edd84d83b357fb7b3a6eea9c7 Mon Sep 17 00:00:00 2001 From: Cheng Zhao Date: Fri, 13 Nov 2015 13:03:00 +0800 Subject: [PATCH] Fix building on OS X --- chromium_src/chrome/common/chrome_constants.cc | 8 +++++++- chromium_src/chrome/common/chrome_constants.h | 8 ++++++++ chromium_src/chrome/common/chrome_paths_mac.mm | 3 +-- 3 files changed, 16 insertions(+), 3 deletions(-) diff --git a/chromium_src/chrome/common/chrome_constants.cc b/chromium_src/chrome/common/chrome_constants.cc index 1e7bd33a96..43a6ccdc7c 100644 --- a/chromium_src/chrome/common/chrome_constants.cc +++ b/chromium_src/chrome/common/chrome_constants.cc @@ -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"); diff --git a/chromium_src/chrome/common/chrome_constants.h b/chromium_src/chrome/common/chrome_constants.h index e36eeeeff4..2df506ac5d 100644 --- a/chromium_src/chrome/common/chrome_constants.h +++ b/chromium_src/chrome/common/chrome_constants.h @@ -11,6 +11,14 @@ 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[]; diff --git a/chromium_src/chrome/common/chrome_paths_mac.mm b/chromium_src/chrome/common/chrome_paths_mac.mm index 09cf13bfe1..4a4eb87dc2 100644 --- a/chromium_src/chrome/common/chrome_paths_mac.mm +++ b/chromium_src/chrome/common/chrome_paths_mac.mm @@ -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;