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

Unified Diff: components/leveldb/leveldb_service_impl.h

Issue 1737933002: mojo leveldb: Get profile and leveldb connected to DOMStorageContext. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add OWNERS file by request. 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: components/leveldb/leveldb_service_impl.h
diff --git a/components/leveldb/leveldb_service_impl.h b/components/leveldb/leveldb_service_impl.h
index 54b2942eba24fcf5a2d1d6a3c39529d4ac165a8a..85f2ff4769bf9f03dbba8ea367411e69b1dee6ec 100644
--- a/components/leveldb/leveldb_service_impl.h
+++ b/components/leveldb/leveldb_service_impl.h
@@ -9,12 +9,16 @@
#include "components/leveldb/leveldb_file_thread.h"
#include "components/leveldb/public/interfaces/leveldb.mojom.h"
+namespace mojo {
+class MessageLoopRef;
+}
+
namespace leveldb {
// Creates LevelDBDatabases based scoped to a |directory|/|dbname|.
class LevelDBServiceImpl : public LevelDBService {
public:
- LevelDBServiceImpl();
+ explicit LevelDBServiceImpl(scoped_ptr<mojo::MessageLoopRef> ref);
~LevelDBServiceImpl() override;
// Overridden from LevelDBService:
@@ -24,6 +28,9 @@ class LevelDBServiceImpl : public LevelDBService {
const OpenCallback& callback) override;
private:
+ // Causes our application to quit when we go out of scope.
+ scoped_ptr<mojo::MessageLoopRef> message_loop_ref_;
+
// Thread to own the mojo message pipe. Because leveldb spawns multiple
// threads that want to call file stuff, we create a dedicated thread to send
// and receive mojo message calls.

Powered by Google App Engine
This is Rietveld 408576698