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

Unified Diff: components/leveldb/leveldb_service_impl.h

Issue 2722293002: Fix lifetime of leveldb::MojoEnv instances. (Closed)
Patch Set: minor cleanups Created 3 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 aca402228a57c1f5a54f548f6b8011e49761d141..84003d479c0fc1b18a8b294ce5a62fb8e1378347 100644
--- a/components/leveldb/leveldb_service_impl.h
+++ b/components/leveldb/leveldb_service_impl.h
@@ -12,6 +12,9 @@
namespace leveldb {
+class Env;
+class MojoEnv;
+
// Creates LevelDBDatabases based scoped to a |directory|/|dbname|.
class LevelDBServiceImpl : public mojom::LevelDBService {
public:
@@ -23,7 +26,6 @@ class LevelDBServiceImpl : public mojom::LevelDBService {
~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 +43,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);
};

Powered by Google App Engine
This is Rietveld 408576698