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

Side by Side Diff: mojo/shell/in_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/in_process_dynamic_service_runner.h ('k') | mojo/shell/keep_alive.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/in_process_dynamic_service_runner.h" 5 #include "mojo/shell/in_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/location.h" 10 #include "base/location.h"
11 #include "base/logging.h" 11 #include "base/logging.h"
12 #include "base/message_loop/message_loop_proxy.h" 12 #include "base/message_loop/message_loop_proxy.h"
13 #include "base/scoped_native_library.h" 13 #include "base/scoped_native_library.h"
14 #include "mojo/public/platform/native/system_thunks.h" 14 #include "mojo/public/platform/native/system_thunks.h"
15 15
16 namespace mojo { 16 namespace mojo {
17 namespace shell { 17 namespace shell {
18 18
19 InProcessDynamicServiceRunner::InProcessDynamicServiceRunner( 19 InProcessDynamicServiceRunner::InProcessDynamicServiceRunner(
20 Context* /*context*/) 20 Context* context)
21 : thread_(this, "app_thread") { 21 : keep_alive_(context),
22 thread_(this, "app_thread") {
22 } 23 }
23 24
24 InProcessDynamicServiceRunner::~InProcessDynamicServiceRunner() { 25 InProcessDynamicServiceRunner::~InProcessDynamicServiceRunner() {
25 if (thread_.HasBeenStarted()) { 26 if (thread_.HasBeenStarted()) {
26 DCHECK(!thread_.HasBeenJoined()); 27 DCHECK(!thread_.HasBeenJoined());
27 thread_.Join(); 28 thread_.Join();
28 } 29 }
29 } 30 }
30 31
31 void InProcessDynamicServiceRunner::Start( 32 void InProcessDynamicServiceRunner::Start(
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 LOG(ERROR) << "MojoMain returned an error: " << result; 93 LOG(ERROR) << "MojoMain returned an error: " << result;
93 } while (false); 94 } while (false);
94 95
95 bool success = app_completed_callback_runner_.Run(); 96 bool success = app_completed_callback_runner_.Run();
96 app_completed_callback_runner_.Reset(); 97 app_completed_callback_runner_.Reset();
97 LOG_IF(ERROR, !success) << "Failed post run app_completed_callback"; 98 LOG_IF(ERROR, !success) << "Failed post run app_completed_callback";
98 } 99 }
99 100
100 } // namespace shell 101 } // namespace shell
101 } // namespace mojo 102 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/shell/in_process_dynamic_service_runner.h ('k') | mojo/shell/keep_alive.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698