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

Unified Diff: content/browser/mojo/mojo_shell_context.cc

Issue 2112543002: Convert UtilityProcessHost to bootstrap Mojo Channel using the Shell connection (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@p9x
Patch Set: . Created 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/browser/mojo/mojo_shell_context.h ('k') | content/browser/utility_process_host_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/mojo/mojo_shell_context.cc
diff --git a/content/browser/mojo/mojo_shell_context.cc b/content/browser/mojo/mojo_shell_context.cc
index e454437fb8314781a70e470c1cd1df3a386616dd..eebbff6acc192636167af120622c59c8302caac6 100644
--- a/content/browser/mojo/mojo_shell_context.cc
+++ b/content/browser/mojo/mojo_shell_context.cc
@@ -60,7 +60,7 @@ void SetConnectorOnIOThread(std::unique_ptr<shell::Connector> connector) {
}
void DestroyConnectorOnIOThread() {
- delete MojoShellContext::GetConnectorForIOThread();
+ delete ShellContext::GetConnectorForIOThread();
io_connector_tls_ptr.Pointer()->Set(nullptr);
}
@@ -336,12 +336,6 @@ void MojoShellContext::ConnectToApplication(
std::move(exposed_services), callback);
}
-// static
-shell::Connector* MojoShellContext::GetConnectorForIOThread() {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
- return io_connector_tls_ptr.Pointer()->Get();
-}
-
void MojoShellContext::ConnectToApplicationOnOwnThread(
const std::string& user_id,
const std::string& name,
@@ -359,4 +353,16 @@ void MojoShellContext::ConnectToApplicationOnOwnThread(
shell_->Connect(std::move(params));
}
+// static
+std::unique_ptr<ShellContext> ShellContext::Create() {
+ return base::WrapUnique(new MojoShellContext);
+}
+
+// static
+shell::Connector* ShellContext::GetConnectorForIOThread() {
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
+ return io_connector_tls_ptr.Pointer()->Get();
+}
+
+
} // namespace content
« no previous file with comments | « content/browser/mojo/mojo_shell_context.h ('k') | content/browser/utility_process_host_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698