OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef COMPONENTS_FILESYSTEM_FILE_SYSTEM_IMPL_H_ | 5 #ifndef COMPONENTS_FILESYSTEM_FILE_SYSTEM_IMPL_H_ |
6 #define COMPONENTS_FILESYSTEM_FILE_SYSTEM_IMPL_H_ | 6 #define COMPONENTS_FILESYSTEM_FILE_SYSTEM_IMPL_H_ |
7 | 7 |
8 #include "base/files/file_path.h" | 8 #include "base/files/file_path.h" |
9 #include "base/macros.h" | 9 #include "base/macros.h" |
10 #include "components/filesystem/public/interfaces/file_system.mojom.h" | 10 #include "components/filesystem/public/interfaces/file_system.mojom.h" |
(...skipping 13 matching lines...) Expand all Loading... |
24 | 24 |
25 class LockTable; | 25 class LockTable; |
26 | 26 |
27 // The base implementation of FileSystemImpl. | 27 // The base implementation of FileSystemImpl. |
28 class FileSystemImpl : public FileSystem { | 28 class FileSystemImpl : public FileSystem { |
29 public: | 29 public: |
30 // |persistent_dir| is the directory served to callers of | 30 // |persistent_dir| is the directory served to callers of |
31 // |OpenPersistentFileSystem(). | 31 // |OpenPersistentFileSystem(). |
32 FileSystemImpl(mojo::Connection* connection, | 32 FileSystemImpl(mojo::Connection* connection, |
33 mojo::InterfaceRequest<FileSystem> request, | 33 mojo::InterfaceRequest<FileSystem> request, |
34 base::FilePath persistent_dir, | 34 const base::FilePath& persistent_dir, |
35 LockTable* lock_table); | 35 LockTable* lock_table); |
36 ~FileSystemImpl() override; | 36 ~FileSystemImpl() override; |
37 | 37 |
38 // |Files| implementation: | 38 // |Files| implementation: |
39 void OpenTempDirectory( | 39 void OpenTempDirectory( |
40 mojo::InterfaceRequest<Directory> directory, | 40 mojo::InterfaceRequest<Directory> directory, |
41 const OpenTempDirectoryCallback& callback) override; | 41 const OpenTempDirectoryCallback& callback) override; |
42 void OpenPersistentFileSystem( | 42 void OpenPersistentFileSystem( |
43 mojo::InterfaceRequest<Directory> directory, | 43 mojo::InterfaceRequest<Directory> directory, |
44 const OpenPersistentFileSystemCallback& callback) override; | 44 const OpenPersistentFileSystemCallback& callback) override; |
45 | 45 |
46 private: | 46 private: |
47 const std::string remote_application_url_; | 47 const std::string remote_application_url_; |
48 mojo::StrongBinding<FileSystem> binding_; | 48 mojo::StrongBinding<FileSystem> binding_; |
49 LockTable* lock_table_; | 49 LockTable* lock_table_; |
50 | 50 |
51 base::FilePath persistent_dir_; | 51 base::FilePath persistent_dir_; |
52 | 52 |
53 DISALLOW_COPY_AND_ASSIGN(FileSystemImpl); | 53 DISALLOW_COPY_AND_ASSIGN(FileSystemImpl); |
54 }; | 54 }; |
55 | 55 |
56 } // namespace filesystem | 56 } // namespace filesystem |
57 | 57 |
58 #endif // COMPONENTS_FILESYSTEM_FILE_SYSTEM_IMPL_H_ | 58 #endif // COMPONENTS_FILESYSTEM_FILE_SYSTEM_IMPL_H_ |
OLD | NEW |