Chromium Code Reviews| Index: content/browser/frame_host/frame_mojo_shell.cc |
| diff --git a/content/browser/frame_host/frame_mojo_shell.cc b/content/browser/frame_host/frame_mojo_shell.cc |
| index 74a9f132184cbe28f1a63d9ccf65d0f7eebb2d74..f63b9a9ebdac03c0f45bf60fa09fc3c8e855b2d8 100644 |
| --- a/content/browser/frame_host/frame_mojo_shell.cc |
| +++ b/content/browser/frame_host/frame_mojo_shell.cc |
| @@ -9,8 +9,10 @@ |
| #include "build/build_config.h" |
| #include "content/browser/mojo/mojo_shell_context.h" |
| #include "content/common/mojo/service_registry_impl.h" |
| +#include "content/public/browser/browser_context.h" |
| #include "content/public/browser/content_browser_client.h" |
| #include "content/public/browser/render_frame_host.h" |
| +#include "content/public/browser/render_process_host.h" |
| #include "content/public/browser/site_instance.h" |
| #include "content/public/common/content_client.h" |
| #include "mojo/common/url_type_converters.h" |
| @@ -34,7 +36,9 @@ void RegisterFrameMojoShellServices(ServiceRegistry* registry, |
| } // namespace |
| FrameMojoShell::FrameMojoShell(RenderFrameHost* frame_host) |
| - : frame_host_(frame_host) { |
| + : frame_host_(frame_host), |
| + mojo_user_id_(BrowserContext::GetMojoUserIdFor( |
|
Ben Goodger (Google)
2016/03/14 22:25:57
do you need to do this here or can you just wait u
Elliot Glaysher
2016/03/14 23:14:53
Done.
|
| + frame_host->GetProcess()->GetBrowserContext())) { |
| } |
| FrameMojoShell::~FrameMojoShell() { |
| @@ -53,14 +57,12 @@ void FrameMojoShell::Connect( |
| mojo::shell::mojom::InterfaceProviderPtr /* exposed_services */, |
| mojo::shell::mojom::ClientProcessConnectionPtr client_process_connection, |
| const mojo::shell::mojom::Connector::ConnectCallback& callback) { |
| - // TODO(beng): user_id is dropped on the floor right now. Figure out what to |
| - // do with it. |
| mojo::shell::mojom::InterfaceProviderPtr frame_services; |
| service_provider_bindings_.AddBinding(GetServiceRegistry(), |
| GetProxy(&frame_services)); |
| MojoShellContext::ConnectToApplication( |
| - target->name, |
| + mojo_user_id_, target->name, |
|
Elliot Glaysher
2016/03/14 20:33:20
We can't pass kInheritUser here since we're callin
|
| frame_host_->GetSiteInstance()->GetSiteURL().spec(), std::move(services), |
| std::move(frame_services), callback); |
| } |