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

Unified Diff: content/common/mojo/current_thread_loader.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/common/mojo/current_thread_loader.cc
diff --git a/content/common/mojo/current_thread_loader.cc b/content/common/mojo/current_thread_loader.cc
new file mode 100644
index 0000000000000000000000000000000000000000..eb64b150863239f08339ed7cf21c581b15caa9b4
--- /dev/null
+++ b/content/common/mojo/current_thread_loader.cc
@@ -0,0 +1,25 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "content/common/mojo/current_thread_loader.h"
+
+namespace content {
+
+CurrentThreadLoader::CurrentThreadLoader(const ApplicationFactory& factory)
+ : factory_(factory) {}
+
+CurrentThreadLoader::~CurrentThreadLoader() {}
+
+void CurrentThreadLoader::Load(const std::string& name,
+ mojo::shell::mojom::ShellClientRequest request) {
+ if (!shell_client_) {
+ shell_client_ = factory_.Run();
+ factory_ = ApplicationFactory();
+ }
+
+ connections_.push_back(make_scoped_ptr(
+ new mojo::ShellConnection(shell_client_.get(), std::move(request))));
+}
+
+} // namespace content

Powered by Google App Engine
This is Rietveld 408576698