Index: content/browser/child_process_launcher_helper_win.cc |
diff --git a/content/browser/child_process_launcher_helper_win.cc b/content/browser/child_process_launcher_helper_win.cc |
index 90d4bdc856f5b1a01bc55b7d9033108e2afed1cd..42fbb347fa4d814e872318878cb12f61d6586daa 100644 |
--- a/content/browser/child_process_launcher_helper_win.cc |
+++ b/content/browser/child_process_launcher_helper_win.cc |
@@ -4,6 +4,7 @@ |
#include "base/files/file_path.h" |
#include "base/metrics/field_trial.h" |
+#include "base/path_service.h" |
#include "base/strings/string_number_conversions.h" |
#include "base/win/scoped_handle.h" |
#include "base/win/win_util.h" |
@@ -115,5 +116,18 @@ void ChildProcessLauncherHelper::SetProcessBackgroundedOnLauncherThread( |
process.SetProcessBackgrounded(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 |