Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(427)

Unified Diff: content/browser/child_process_launcher_helper_mac.cc

Issue 2684433003: Files required by a service now listed in manifest. (Closed)
Patch Set: Fixed analysis. Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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

Powered by Google App Engine
This is Rietveld 408576698