Commit 06253366 authored by Miyoung Shin's avatar Miyoung Shin Committed by Commit Bot

Convert FileSystem to new Mojo types

This CL converts FileSystemPtr in content to the new Mojo type.

Bug: 955171
Change-Id: I367ee37e060b8f79bd53bfe6e363c4bdb3cbba0f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1810506Reviewed-by: default avatarVictor Costan <pwnall@chromium.org>
Reviewed-by: default avatarOksana Zhuravlova <oksamyt@chromium.org>
Commit-Queue: Miyoung Shin <myid.shin@igalia.com>
Cr-Commit-Position: refs/heads/master@{#697856}
parent 6ceb6342
......@@ -712,7 +712,9 @@ void LocalStorageContextMojo::InitiateConnection(bool in_memory_only) {
if (!subdirectory_.empty() && !in_memory_only) {
// We were given a subdirectory to write to. Get it and use a disk backed
// database.
connector_->BindInterface(file::mojom::kServiceName, &file_system_);
file_system_.reset();
connector_->Connect(file::mojom::kServiceName,
file_system_.BindNewPipeAndPassReceiver());
file_system_->GetSubDirectory(
subdirectory_.AsUTF8Unsafe(), MakeRequest(&directory_),
base::BindOnce(&LocalStorageContextMojo::OnDirectoryOpened,
......
......@@ -184,7 +184,7 @@ class CONTENT_EXPORT LocalStorageContextMojo
bool force_keep_session_state_ = false;
scoped_refptr<storage::SpecialStoragePolicy> special_storage_policy_;
file::mojom::FileSystemPtr file_system_;
mojo::Remote<file::mojom::FileSystem> file_system_;
filesystem::mojom::DirectoryPtr directory_;
base::trace_event::MemoryAllocatorDumpGuid memory_dump_id_;
......
......@@ -711,7 +711,9 @@ void SessionStorageContextMojo::InitiateConnection(bool in_memory_only) {
if (backing_mode_ != BackingMode::kNoDisk && !in_memory_only) {
// We were given a subdirectory to write to. Get it and use a disk backed
// database.
connector_->BindInterface(file::mojom::kServiceName, &file_system_);
file_system_.reset();
connector_->Connect(file::mojom::kServiceName,
file_system_.BindNewPipeAndPassReceiver());
file_system_->GetSubDirectory(
partition_directory_path_.AsUTF8Unsafe(),
MakeRequest(&partition_directory_),
......
......@@ -253,7 +253,7 @@ class CONTENT_EXPORT SessionStorageContextMojo
} connection_state_ = NO_CONNECTION;
bool database_initialized_ = false;
file::mojom::FileSystemPtr file_system_;
mojo::Remote<file::mojom::FileSystem> file_system_;
filesystem::mojom::DirectoryPtr partition_directory_;
base::trace_event::MemoryAllocatorDumpGuid memory_dump_id_;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment