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

Unified Diff: components/filesystem/directory_impl.h

Issue 2326913003: Privatize StrongBinding lifetime management (Closed)
Patch Set: rebase Created 4 years, 3 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/filesystem/directory_impl.h
diff --git a/components/filesystem/directory_impl.h b/components/filesystem/directory_impl.h
index 5b2ed5eb021ebc26abc2641f785106b04a52d26c..8d874432d4a6e31f0ec2232c60cc74dc926f1245 100644
--- a/components/filesystem/directory_impl.h
+++ b/components/filesystem/directory_impl.h
@@ -15,7 +15,6 @@
#include "components/filesystem/public/interfaces/directory.mojom.h"
#include "components/filesystem/shared_temp_dir.h"
#include "mojo/public/cpp/bindings/interface_request.h"
-#include "mojo/public/cpp/bindings/strong_binding.h"
namespace filesystem {
@@ -25,20 +24,15 @@ class DirectoryImpl : public mojom::Directory {
public:
// Set |temp_dir| only if there's a temporary directory that should be deleted
// when this object is destroyed.
- DirectoryImpl(mojo::InterfaceRequest<mojom::Directory> request,
- base::FilePath directory_path,
+ DirectoryImpl(base::FilePath directory_path,
scoped_refptr<SharedTempDir> temp_dir,
scoped_refptr<LockTable> lock_table);
~DirectoryImpl() override;
- void set_connection_error_handler(const base::Closure& error_handler) {
- binding_.set_connection_error_handler(error_handler);
- }
-
// |Directory| implementation:
void Read(const ReadCallback& callback) override;
void OpenFile(const mojo::String& path,
- mojo::InterfaceRequest<mojom::File> file,
+ mojom::FileRequest file,
uint32_t open_flags,
const OpenFileCallback& callback) override;
void OpenFileHandle(const mojo::String& path,
@@ -47,7 +41,7 @@ class DirectoryImpl : public mojom::Directory {
void OpenFileHandles(mojo::Array<mojom::FileOpenDetailsPtr> details,
const OpenFileHandlesCallback& callback) override;
void OpenDirectory(const mojo::String& path,
- mojo::InterfaceRequest<mojom::Directory> directory,
+ mojom::DirectoryRequest directory,
uint32_t open_flags,
const OpenDirectoryCallback& callback) override;
void Rename(const mojo::String& path,
@@ -63,7 +57,7 @@ class DirectoryImpl : public mojom::Directory {
void Flush(const FlushCallback& callback) override;
void StatFile(const mojo::String& path,
const StatFileCallback& callback) override;
- void Clone(mojo::InterfaceRequest<mojom::Directory> directory) override;
+ void Clone(mojom::DirectoryRequest directory) override;
void ReadEntireFile(const mojo::String& path,
const ReadEntireFileCallback& callback) override;
void WriteFile(const mojo::String& path,
@@ -75,7 +69,6 @@ class DirectoryImpl : public mojom::Directory {
uint32_t open_flags,
mojom::FileError* error);
- mojo::StrongBinding<mojom::Directory> binding_;
base::FilePath directory_path_;
scoped_refptr<SharedTempDir> temp_dir_;
scoped_refptr<LockTable> lock_table_;

Powered by Google App Engine
This is Rietveld 408576698