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

Unified Diff: mojo/shell/out_of_process_dynamic_service_runner.cc

Issue 775343004: Move //mojo/shell to //shell (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years 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
« no previous file with comments | « mojo/shell/out_of_process_dynamic_service_runner.h ('k') | mojo/shell/shell_test_base.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/shell/out_of_process_dynamic_service_runner.cc
diff --git a/mojo/shell/out_of_process_dynamic_service_runner.cc b/mojo/shell/out_of_process_dynamic_service_runner.cc
deleted file mode 100644
index cec762cdefde5e311f618f1da906c3b0f030c442..0000000000000000000000000000000000000000
--- a/mojo/shell/out_of_process_dynamic_service_runner.cc
+++ /dev/null
@@ -1,60 +0,0 @@
-// Copyright 2014 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "mojo/shell/out_of_process_dynamic_service_runner.h"
-
-#include "base/bind.h"
-#include "base/callback_helpers.h"
-#include "base/files/file_util.h"
-#include "base/logging.h"
-#include "base/scoped_native_library.h"
-
-namespace mojo {
-namespace shell {
-
-OutOfProcessDynamicServiceRunner::OutOfProcessDynamicServiceRunner(
- Context* context)
- : context_(context) {
-}
-
-OutOfProcessDynamicServiceRunner::~OutOfProcessDynamicServiceRunner() {
- if (app_child_process_host_) {
- // TODO(vtl): Race condition: If |AppChildProcessHost::DidStart()| hasn't
- // been called yet, we shouldn't call |Join()| here. (Until |DidStart()|, we
- // may not have a child process to wait on.) Probably we should fix
- // |Join()|.
- app_child_process_host_->Join();
- }
-}
-
-void OutOfProcessDynamicServiceRunner::Start(
- const base::FilePath& app_path,
- ScopedMessagePipeHandle service_handle,
- const base::Closure& app_completed_callback) {
- app_path_ = app_path;
-
- DCHECK(app_completed_callback_.is_null());
- app_completed_callback_ = app_completed_callback;
-
- app_child_process_host_.reset(new AppChildProcessHost(context_, this));
- app_child_process_host_->Start();
-
- // TODO(vtl): |app_path.AsUTF8Unsafe()| is unsafe.
- app_child_process_host_->controller()->StartApp(
- app_path.AsUTF8Unsafe(),
- ScopedMessagePipeHandle(MessagePipeHandle(
- service_handle.release().value())));
-}
-
-void OutOfProcessDynamicServiceRunner::AppCompleted(int32_t result) {
- DVLOG(2) << "OutOfProcessDynamicServiceRunner::AppCompleted(" << result
- << ")";
-
- app_completed_callback_.Run();
- app_completed_callback_.Reset();
- app_child_process_host_.reset();
-}
-
-} // namespace shell
-} // namespace mojo
« no previous file with comments | « mojo/shell/out_of_process_dynamic_service_runner.h ('k') | mojo/shell/shell_test_base.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698