Change how we detect Helper process
This commit is contained in:
parent
c46fa6d959
commit
77f7cfc938
1 changed files with 5 additions and 5 deletions
|
@ -5,10 +5,10 @@
|
||||||
|
|
||||||
#import "common/mac/main_application_bundle.h"
|
#import "common/mac/main_application_bundle.h"
|
||||||
|
|
||||||
#import "common/mac/foundation_util.h"
|
#include "base/files/file_path.h"
|
||||||
|
#include "base/mac/foundation_util.h"
|
||||||
#import "base/files/file_path.h"
|
#include "base/path_service.h"
|
||||||
#import "base/path_service.h"
|
#include "base/strings/string_util.h"
|
||||||
|
|
||||||
namespace brightray {
|
namespace brightray {
|
||||||
|
|
||||||
|
@ -18,7 +18,7 @@ base::FilePath MainApplicationBundlePath() {
|
||||||
PathService::Get(base::FILE_EXE, &path);
|
PathService::Get(base::FILE_EXE, &path);
|
||||||
|
|
||||||
// Up to Contents.
|
// Up to Contents.
|
||||||
if (base::mac::IsBackgroundOnlyProcess()) {
|
if (base::EndsWith(path.value(), " Helper", base::CompareCase::SENSITIVE)) {
|
||||||
// The running executable is the helper. Go up five steps:
|
// The running executable is the helper. Go up five steps:
|
||||||
// Contents/Frameworks/Helper.app/Contents/MacOS/Helper
|
// Contents/Frameworks/Helper.app/Contents/MacOS/Helper
|
||||||
// ^ to here ^ from here
|
// ^ to here ^ from here
|
||||||
|
|
Loading…
Reference in a new issue