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

Unified Diff: content/browser/frame_host/frame_mojo_shell.cc

Issue 1737933002: mojo leveldb: Get profile and leveldb connected to DOMStorageContext. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: merge tot Created 4 years, 9 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
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..556bfc9152f9b95a332d86cc0b655239d7aec197 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"
@@ -53,14 +55,13 @@ 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));
-
+ std::string mojo_user_id = BrowserContext::GetMojoUserIdFor(
+ frame_host_->GetProcess()->GetBrowserContext());
MojoShellContext::ConnectToApplication(
- target->name,
+ mojo_user_id, target->name,
frame_host_->GetSiteInstance()->GetSiteURL().spec(), std::move(services),
std::move(frame_services), callback);
}

Powered by Google App Engine
This is Rietveld 408576698