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

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

Issue 779633002: Small fix in out_of_process_dynamic_service_runner.cc (Closed) Base URL: https://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 unified diff | Download patch
« no previous file with comments | « mojo/shell/out_of_process_dynamic_service_runner.h ('k') | no next file » | 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/files/file_util.h" 9 #include "base/files/file_util.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 16 matching lines...) Expand all
27 app_child_process_host_->Join(); 27 app_child_process_host_->Join();
28 } 28 }
29 } 29 }
30 30
31 void OutOfProcessDynamicServiceRunner::Start( 31 void OutOfProcessDynamicServiceRunner::Start(
32 const base::FilePath& app_path, 32 const base::FilePath& app_path,
33 ScopedMessagePipeHandle service_handle, 33 ScopedMessagePipeHandle service_handle,
34 const base::Closure& app_completed_callback) { 34 const base::Closure& app_completed_callback) {
35 app_path_ = app_path; 35 app_path_ = app_path;
36 36
37 DCHECK(!service_handle_.is_valid());
qsr 2014/12/03 14:23:05 The private field is never used, outside of this m
38 service_handle_ = service_handle.Pass();
39
40 DCHECK(app_completed_callback_.is_null()); 37 DCHECK(app_completed_callback_.is_null());
41 app_completed_callback_ = app_completed_callback; 38 app_completed_callback_ = app_completed_callback;
42 39
43 app_child_process_host_.reset(new AppChildProcessHost(context_, this)); 40 app_child_process_host_.reset(new AppChildProcessHost(context_, this));
44 app_child_process_host_->Start(); 41 app_child_process_host_->Start();
45 42
46 // TODO(vtl): |app_path.AsUTF8Unsafe()| is unsafe. 43 // TODO(vtl): |app_path.AsUTF8Unsafe()| is unsafe.
47 app_child_process_host_->controller()->StartApp( 44 app_child_process_host_->controller()->StartApp(
48 app_path.AsUTF8Unsafe(), 45 app_path.AsUTF8Unsafe(),
49 ScopedMessagePipeHandle(MessagePipeHandle( 46 ScopedMessagePipeHandle(MessagePipeHandle(
50 service_handle.release().value()))); 47 service_handle.release().value())));
51 } 48 }
52 49
53 void OutOfProcessDynamicServiceRunner::AppCompleted(int32_t result) { 50 void OutOfProcessDynamicServiceRunner::AppCompleted(int32_t result) {
54 DVLOG(2) << "OutOfProcessDynamicServiceRunner::AppCompleted(" << result 51 DVLOG(2) << "OutOfProcessDynamicServiceRunner::AppCompleted(" << result
55 << ")"; 52 << ")";
56 53
57 app_completed_callback_.Run(); 54 app_completed_callback_.Run();
58 app_completed_callback_.Reset(); 55 app_completed_callback_.Reset();
59 app_child_process_host_.reset(); 56 app_child_process_host_.reset();
60 } 57 }
61 58
62 } // namespace shell 59 } // namespace shell
63 } // namespace mojo 60 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/shell/out_of_process_dynamic_service_runner.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698