mojo leveldb: Get profile and leveldb connected to DOMStorageContext.
Building on the last patch which built mojo:profile and built one
for each BrowserContext, we move the LevelDBService in the profile
application to a dedicated leveldb thread to avoid deadlocks.
(Since applications all run on one thread by default, leveldb would
deadlock while waiting for profile to return data.)
This patch connects to the correct applications in
DOMStorageContextWrapper and then vends a LevelDBService instance to
each LevelDBWrapperImpl, for future use.
BUG=586194
CQ_INCLUDE_TRYBOTS=tryserver.chromium.linux:linux_site_isolation
Review URL: https://codereview.chromium.org/1737933002
Cr-Commit-Position: refs/heads/master@{#382343}
diff --git a/components/filesystem/file_impl.h b/components/filesystem/file_impl.h
index 9314776c..bdae38e0 100644
--- a/components/filesystem/file_impl.h
+++ b/components/filesystem/file_impl.h
@@ -27,11 +27,11 @@
FileImpl(mojo::InterfaceRequest<File> request,
const base::FilePath& path,
uint32_t flags,
- LockTable* lock_table);
+ scoped_refptr<LockTable> lock_table);
FileImpl(mojo::InterfaceRequest<File> request,
const base::FilePath& path,
base::File file,
- LockTable* lock_table);
+ scoped_refptr<LockTable> lock_table);
~FileImpl() override;
// Returns whether the underlying file handle is valid.
@@ -74,7 +74,7 @@
mojo::StrongBinding<File> binding_;
base::File file_;
base::FilePath path_;
- LockTable* lock_table_;
+ scoped_refptr<LockTable> lock_table_;
DISALLOW_COPY_AND_ASSIGN(FileImpl);
};