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

Unified Diff: shell/child_process_host.h

Issue 1146273002: Make ChildProcessHost::DoLaunch() not touch a random set of things on a different thread. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | shell/child_process_host.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: shell/child_process_host.h
diff --git a/shell/child_process_host.h b/shell/child_process_host.h
index d5e45624e2f9721858e511b2913c9058ab843b54..79fb292fd1f3b93ecec915ae3823828033595298 100644
--- a/shell/child_process_host.h
+++ b/shell/child_process_host.h
@@ -10,9 +10,9 @@
#include <string>
#include "base/macros.h"
+#include "base/memory/scoped_ptr.h"
#include "base/process/process.h"
#include "mojo/edk/embedder/channel_info_forward.h"
-#include "mojo/edk/embedder/platform_channel_pair.h"
#include "mojo/edk/embedder/scoped_platform_handle.h"
#include "mojo/public/cpp/bindings/error_handler.h"
#include "shell/child_controller.mojom.h"
@@ -60,13 +60,17 @@ class ChildProcessHost : public mojo::ErrorHandler {
// TODO(vtl): This is virtual, so tests can override it, but really |Start()|
// should take a callback (see above) and this should be private.
- virtual void DidStart(bool success);
+ virtual void DidStart(base::Process child_process);
private:
+ struct LaunchData;
+
// Callback for |mojo::embedder::CreateChannel()|.
void DidCreateChannel(mojo::embedder::ChannelInfo* channel_info);
- bool DoLaunch(const std::string& child_connection_id);
+ // Note: This is probably executed on a different thread (namely, using the
+ // blocking pool).
+ base::Process DoLaunch(scoped_ptr<LaunchData> launch_data);
void AppCompleted(int32_t result);
@@ -74,7 +78,6 @@ class ChildProcessHost : public mojo::ErrorHandler {
void OnConnectionError() override;
Context* const context_;
- mojo::embedder::PlatformChannelPair platform_channel_pair_;
ChildControllerPtr controller_;
mojo::embedder::ChannelInfo* channel_info_;
« no previous file with comments | « no previous file | shell/child_process_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698