Index: content/browser/child_process_launcher_helper_mac.cc |
diff --git a/content/browser/child_process_launcher_helper_mac.cc b/content/browser/child_process_launcher_helper_mac.cc |
index 9a8bda0470ede897e8144e096bd4529eacdbf149..f9241ae5e9db288cb0c8ffbfff5b2e2e2147cf0b 100644 |
--- a/content/browser/child_process_launcher_helper_mac.cc |
+++ b/content/browser/child_process_launcher_helper_mac.cc |
@@ -3,6 +3,7 @@ |
// found in the LICENSE file. |
#include "base/memory/ptr_util.h" |
+#include "base/path_service.h" |
#include "base/posix/global_descriptors.h" |
#include "content/browser/bootstrap_sandbox_manager_mac.h" |
#include "content/browser/child_process_launcher.h" |
@@ -146,5 +147,18 @@ void ChildProcessLauncherHelper::SetProcessBackgroundedOnLauncherThread( |
process.SetProcessBackgrounded(MachBroker::GetInstance(), background); |
} |
+// static |
+base::File ChildProcessLauncherHelper::OpenFile( |
+ const base::FilePath& path, |
+ base::MemoryMappedFile::Region* region) { |
+ base::FilePath exe_dir; |
+ bool result = base::PathService::Get(base::BasePathKey::DIR_EXE, &exe_dir); |
+ DCHECK(result); |
+ base::File file(exe_dir.Append(path), |
+ base::File::FLAG_OPEN | base::File::FLAG_READ); |
+ *region = base::MemoryMappedFile::Region::kWholeFile; |
+ return file; |
+} |
+ |
} // namespace internal |
} // namespace content |