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

Unified Diff: shell/in_process_dynamic_service_runner.cc

Issue 865253002: Delete temporary application file as soon as the application is launched. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Follow review Created 5 years, 11 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: shell/in_process_dynamic_service_runner.cc
diff --git a/shell/in_process_dynamic_service_runner.cc b/shell/in_process_dynamic_service_runner.cc
index cdcbd012c6c7b2eac84f860f4e93d6cea897d402..1a9085006168f831ed8bdcc60aefa3838f9af1c4 100644
--- a/shell/in_process_dynamic_service_runner.cc
+++ b/shell/in_process_dynamic_service_runner.cc
@@ -14,7 +14,8 @@ namespace mojo {
namespace shell {
InProcessDynamicServiceRunner::InProcessDynamicServiceRunner(Context* context)
- : app_library_(nullptr) {
+ : cleanup_behavior_(DynamicServiceRunner::DontDeleteAppPath),
+ app_library_(nullptr) {
}
InProcessDynamicServiceRunner::~InProcessDynamicServiceRunner() {
@@ -30,9 +31,11 @@ InProcessDynamicServiceRunner::~InProcessDynamicServiceRunner() {
void InProcessDynamicServiceRunner::Start(
const base::FilePath& app_path,
+ DynamicServiceRunner::CleanupBehavior cleanup_behavior,
ScopedMessagePipeHandle service_handle,
const base::Closure& app_completed_callback) {
app_path_ = app_path;
+ cleanup_behavior_ = cleanup_behavior;
DCHECK(!service_handle_.is_valid());
service_handle_ = service_handle.Pass();
@@ -52,7 +55,8 @@ void InProcessDynamicServiceRunner::Run() {
<< app_path_.value()
<< " thread id=" << base::PlatformThread::CurrentId();
- app_library_.Reset(LoadAndRunService(app_path_, service_handle_.Pass()));
+ app_library_.Reset(
+ LoadAndRunService(app_path_, cleanup_behavior_, service_handle_.Pass()));
app_completed_callback_runner_.Run();
app_completed_callback_runner_.Reset();
}

Powered by Google App Engine
This is Rietveld 408576698