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

Unified Diff: shell/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: clang format 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/dynamic_service_runner.cc
diff --git a/shell/dynamic_service_runner.cc b/shell/dynamic_service_runner.cc
index fc0a0abc72bc9c3e1e2721a1db7d682ac5ae2b55..2605debd711f38168250c1a96f0dcdc8723241d4 100644
--- a/shell/dynamic_service_runner.cc
+++ b/shell/dynamic_service_runner.cc
@@ -5,6 +5,7 @@
#include "shell/dynamic_service_runner.h"
#include "base/files/file_path.h"
+#include "base/files/file_util.h"
#include "base/logging.h"
#include "mojo/public/platform/native/gles2_impl_chromium_sync_point_thunks.h"
#include "mojo/public/platform/native/gles2_impl_chromium_texture_mailbox_thunks.h"
@@ -40,11 +41,14 @@ bool SetThunks(Thunks (*make_thunks)(),
base::NativeLibrary DynamicServiceRunner::LoadAndRunService(
const base::FilePath& app_path,
+ bool clean_app_path,
ScopedMessagePipeHandle service_handle) {
DVLOG(2) << "Loading/running Mojo app in process from library: "
<< app_path.value();
base::NativeLibraryLoadError error;
base::NativeLibrary app_library = base::LoadNativeLibrary(app_path, &error);
+ if (clean_app_path)
+ DeleteFile(app_path, false);
do {
if (!app_library) {
LOG(ERROR) << "Failed to load app library (error: " << error.ToString()

Powered by Google App Engine
This is Rietveld 408576698