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

Side by Side Diff: shell/child_process_host.cc

Issue 1088533003: Adding URLResponse Disk Cache to mojo. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Follow review Created 5 years, 7 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
« no previous file with comments | « shell/child_process_host.h ('k') | shell/child_process_host_unittest.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 "shell/child_process_host.h" 5 #include "shell/child_process_host.h"
6 6
7 #include "base/base_switches.h" 7 #include "base/base_switches.h"
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/files/file_path.h" 10 #include "base/files/file_path.h"
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 DCHECK(child_process_.IsValid()); 54 DCHECK(child_process_.IsValid());
55 int rv = -1; 55 int rv = -1;
56 LOG_IF(ERROR, !child_process_.WaitForExit(&rv)) 56 LOG_IF(ERROR, !child_process_.WaitForExit(&rv))
57 << "Failed to wait for child process"; 57 << "Failed to wait for child process";
58 child_process_.Close(); 58 child_process_.Close();
59 return rv; 59 return rv;
60 } 60 }
61 61
62 void ChildProcessHost::StartApp( 62 void ChildProcessHost::StartApp(
63 const mojo::String& app_path, 63 const mojo::String& app_path,
64 bool clean_app_path,
65 mojo::InterfaceRequest<mojo::Application> application_request, 64 mojo::InterfaceRequest<mojo::Application> application_request,
66 const ChildController::StartAppCallback& on_app_complete) { 65 const ChildController::StartAppCallback& on_app_complete) {
67 DCHECK(controller_); 66 DCHECK(controller_);
68 67
69 on_app_complete_ = on_app_complete; 68 on_app_complete_ = on_app_complete;
70 controller_->StartApp( 69 controller_->StartApp(
71 app_path, clean_app_path, application_request.Pass(), 70 app_path, application_request.Pass(),
72 base::Bind(&ChildProcessHost::AppCompleted, base::Unretained(this))); 71 base::Bind(&ChildProcessHost::AppCompleted, base::Unretained(this)));
73 } 72 }
74 73
75 void ChildProcessHost::ExitNow(int32_t exit_code) { 74 void ChildProcessHost::ExitNow(int32_t exit_code) {
76 DCHECK(controller_); 75 DCHECK(controller_);
77 76
78 controller_->ExitNow(exit_code); 77 controller_->ExitNow(exit_code);
79 } 78 }
80 79
81 void ChildProcessHost::DidStart(bool success) { 80 void ChildProcessHost::DidStart(bool success) {
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 on_app_complete_.reset(); 129 on_app_complete_.reset();
131 on_app_complete.Run(result); 130 on_app_complete.Run(result);
132 } 131 }
133 } 132 }
134 133
135 void ChildProcessHost::OnConnectionError() { 134 void ChildProcessHost::OnConnectionError() {
136 AppCompleted(MOJO_RESULT_UNKNOWN); 135 AppCompleted(MOJO_RESULT_UNKNOWN);
137 } 136 }
138 137
139 } // namespace shell 138 } // namespace shell
OLDNEW
« no previous file with comments | « shell/child_process_host.h ('k') | shell/child_process_host_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698