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

Unified Diff: content/browser/child_process_launcher_helper_win.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_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

Powered by Google App Engine
This is Rietveld 408576698