From: Paul Betts Date: Mon, 8 Dec 2014 05:06:47 +0000 (-0800) Subject: Delete OverrideChildProcessPath and OverrideFrameworkBundlePath altogether X-Git-Tag: v0.20.0~8^2~3 X-Git-Url: http://git.khamidou.com/?a=commitdiff_plain;h=8eab230fe11250413f4ecc708eb3212c84385e1b;p=electron.git Delete OverrideChildProcessPath and OverrideFrameworkBundlePath altogether --- diff --git a/atom.gyp b/atom.gyp index e3c9eeab..3b607589 100644 --- a/atom.gyp +++ b/atom.gyp @@ -58,7 +58,6 @@ 'atom/app/atom_content_client.h', 'atom/app/atom_main_delegate.cc', 'atom/app/atom_main_delegate.h', - 'atom/app/atom_main_delegate_mac.mm', 'atom/browser/api/atom_api_app.cc', 'atom/browser/api/atom_api_app.h', 'atom/browser/api/atom_api_auto_updater.cc', diff --git a/atom/app/atom_main_delegate.h b/atom/app/atom_main_delegate.h index 8cd4a28e..9f743863 100644 --- a/atom/app/atom_main_delegate.h +++ b/atom/app/atom_main_delegate.h @@ -26,10 +26,6 @@ class AtomMainDelegate : public brightray::MainDelegate { scoped_ptr CreateContentClient() override; void AddDataPackFromPath( ui::ResourceBundle* bundle, const base::FilePath& pak_dir) override; -#if defined(OS_MACOSX) - void OverrideChildProcessPath() override; - void OverrideFrameworkBundlePath() override; -#endif private: brightray::ContentClient content_client_; diff --git a/atom/app/atom_main_delegate_mac.mm b/atom/app/atom_main_delegate_mac.mm deleted file mode 100644 index 856f510a..00000000 --- a/atom/app/atom_main_delegate_mac.mm +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright (c) 2013 GitHub, Inc. -// Use of this source code is governed by the MIT license that can be -// found in the LICENSE file. - -#include "atom/app/atom_main_delegate.h" - -#include "base/mac/bundle_locations.h" -#include "base/files/file_path.h" -#include "base/path_service.h" -#include "brightray/common/mac/main_application_bundle.h" -#include "content/public/common/content_paths.h" - -namespace atom { - -namespace { - -base::FilePath GetFrameworksPath() { - return brightray::MainApplicationBundlePath().Append("Contents") - .Append("Frameworks"); -} - -std::string GetApplicationName() { - std::string name = brightray::MainApplicationBundlePath().BaseName().AsUTF8Unsafe(); - return name.substr(0, name.length() - 4/*.app*/); -} - -} // namespace - -void AtomMainDelegate::OverrideFrameworkBundlePath() { - base::FilePath bundlePath = GetFrameworksPath(); - std::string app_name = GetApplicationName(); - - base::mac::SetOverrideFrameworkBundlePath(bundlePath - .Append(app_name + " Framework.framework")); -} - -void AtomMainDelegate::OverrideChildProcessPath() { - std::string app_name = GetApplicationName(); - - base::FilePath helper_path = GetFrameworksPath().Append(app_name + " Helper.app") - .Append("Contents") - .Append("MacOS") - .Append(app_name + " Helper"); - PathService::Override(content::CHILD_PROCESS_EXE, helper_path); -} - -} // namespace atom