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

Side by Side Diff: mojo/shell/out_of_process_dynamic_service_runner.cc

Issue 323593002: Mojo: Use network service to load non-local Mojo Apps. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 years, 6 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « mojo/shell/out_of_process_dynamic_service_runner.h ('k') | mojo/shell/run.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "mojo/shell/out_of_process_dynamic_service_runner.h" 5 #include "mojo/shell/out_of_process_dynamic_service_runner.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/callback_helpers.h" 8 #include "base/callback_helpers.h"
9 #include "base/file_util.h" 9 #include "base/file_util.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
11 #include "base/scoped_native_library.h" 11 #include "base/scoped_native_library.h"
12 12
13 namespace mojo { 13 namespace mojo {
14 namespace shell { 14 namespace shell {
15 15
16 OutOfProcessDynamicServiceRunner::OutOfProcessDynamicServiceRunner( 16 OutOfProcessDynamicServiceRunner::OutOfProcessDynamicServiceRunner(
17 Context* context) 17 Context* context)
18 : context_(context) { 18 : context_(context),
19 keep_alive_(context) {
19 } 20 }
20 21
21 OutOfProcessDynamicServiceRunner::~OutOfProcessDynamicServiceRunner() { 22 OutOfProcessDynamicServiceRunner::~OutOfProcessDynamicServiceRunner() {
22 if (app_child_process_host_) { 23 if (app_child_process_host_) {
23 // TODO(vtl): Race condition: If |AppChildProcessHost::DidStart()| hasn't 24 // TODO(vtl): Race condition: If |AppChildProcessHost::DidStart()| hasn't
24 // been called yet, we shouldn't call |Join()| here. (Until |DidStart()|, we 25 // been called yet, we shouldn't call |Join()| here. (Until |DidStart()|, we
25 // may not have a child process to wait on.) Probably we should fix 26 // may not have a child process to wait on.) Probably we should fix
26 // |Join()|. 27 // |Join()|.
27 app_child_process_host_->Join(); 28 app_child_process_host_->Join();
28 } 29 }
(...skipping 25 matching lines...) Expand all
54 DVLOG(2) << "OutOfProcessDynamicServiceRunner::AppCompleted(" << result 55 DVLOG(2) << "OutOfProcessDynamicServiceRunner::AppCompleted(" << result
55 << ")"; 56 << ")";
56 57
57 app_completed_callback_.Run(); 58 app_completed_callback_.Run();
58 app_completed_callback_.Reset(); 59 app_completed_callback_.Reset();
59 app_child_process_host_.reset(); 60 app_child_process_host_.reset();
60 } 61 }
61 62
62 } // namespace shell 63 } // namespace shell
63 } // namespace mojo 64 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/shell/out_of_process_dynamic_service_runner.h ('k') | mojo/shell/run.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698