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

Unified Diff: content/browser/mojo/mojo_shell_context.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: Created 4 years, 10 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/level_db_wrapper_impl.cc ('k') | no next file » | 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 31f449aec51726fefed10b822d0ef210d6b04a46..5f65ef8d5fdcb92aa0ca34bd0335f35d90f4dcf5 100644
--- a/content/browser/mojo/mojo_shell_context.cc
+++ b/content/browser/mojo/mojo_shell_context.cc
@@ -6,11 +6,14 @@
#include <utility>
+#include "base/bind.h"
#include "base/lazy_instance.h"
#include "base/macros.h"
#include "base/path_service.h"
#include "base/single_thread_task_runner.h"
#include "base/thread_task_runner_handle.h"
+#include "components/filesystem/file_system_app.h"
+#include "components/leveldb/leveldb_app.h"
#include "content/browser/gpu/gpu_process_host.h"
#include "content/common/gpu/gpu_process_launch_causes.h"
#include "content/common/mojo/static_application_loader.h"
@@ -249,6 +252,24 @@ MojoShellContext::MojoShellContext() {
scoped_ptr<mojo::shell::ApplicationLoader>(new GpuProcessLoader()),
GURL("mojo:media"));
#endif
+
+ // This starts the filesystem stuff, but it immediately breaks due to
+ // the capability filter preventing filesystem from contacting tracing.
+ base::FilePath path =
+ base::FilePath::FromUTF8Unsafe("/work/chrome/tmp_profile");
Elliot Glaysher 2016/02/25 23:16:12 So my current big question is how do I safely get
+ base::Callback<scoped_ptr<mojo::ShellClient>()> fs_callback =
+ base::Bind(&filesystem::CreateFileSystemApp, path);
+ application_manager_->SetLoaderForURL(
+ scoped_ptr<mojo::shell::ApplicationLoader>(
+ new StaticApplicationLoader(fs_callback)),
+ GURL("mojo:filesystem"));
+
+ base::Callback<scoped_ptr<mojo::ShellClient>()> leveldb_callback =
+ base::Bind(&leveldb::CreateLevelDBApp);
+ application_manager_->SetLoaderForURL(
+ scoped_ptr<mojo::shell::ApplicationLoader>(
+ new StaticApplicationLoader(leveldb_callback)),
+ GURL("mojo:leveldb"));
}
MojoShellContext::~MojoShellContext() {
« no previous file with comments | « content/browser/level_db_wrapper_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698