Index: components/leveldb/leveldb_service_impl.h |
diff --git a/components/leveldb/leveldb_service_impl.h b/components/leveldb/leveldb_service_impl.h |
index aca402228a57c1f5a54f548f6b8011e49761d141..f3ca018547ac737040008e117d484d231c48e26f 100644 |
--- a/components/leveldb/leveldb_service_impl.h |
+++ b/components/leveldb/leveldb_service_impl.h |
@@ -12,18 +12,18 @@ |
namespace leveldb { |
+class MojoEnv; |
+ |
// Creates LevelDBDatabases based scoped to a |directory|/|dbname|. |
class LevelDBServiceImpl : public mojom::LevelDBService { |
public: |
// The |file_task_runner| is used to run tasks to interact with the |
// file_service. Specifically this task runner must NOT be the same as the |
// task runner this implementation runs on, or deadlock might occur. |
- LevelDBServiceImpl( |
- scoped_refptr<base::SingleThreadTaskRunner> file_task_runner); |
+ explicit LevelDBServiceImpl(MojoEnv* env); |
~LevelDBServiceImpl() override; |
// Overridden from LevelDBService: |
- void SetEnvironmentName(const std::string& name) override; |
void Open(filesystem::mojom::DirectoryPtr directory, |
const std::string& dbname, |
leveldb::mojom::LevelDBDatabaseAssociatedRequest database, |
@@ -41,12 +41,7 @@ class LevelDBServiceImpl : public mojom::LevelDBService { |
const DestroyCallback& callback) override; |
private: |
- // 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. |
- scoped_refptr<LevelDBMojoProxy> thread_; |
- |
- std::string environment_name_; |
+ MojoEnv* env_; |
DISALLOW_COPY_AND_ASSIGN(LevelDBServiceImpl); |
}; |