OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef SQL_MOJO_ENABLE_MOJO_FS_H_ |
| 6 #define SQL_MOJO_ENABLE_MOJO_FS_H_ |
| 7 |
| 8 #include "base/macros.h" |
| 9 #include "components/filesystem/public/interfaces/directory.mojom.h" |
| 10 |
| 11 namespace sql { |
| 12 |
| 13 // Changes the default sqlite3 vfs to a vfs that uses proxies calls to the |
| 14 // mojo:filesystem service. Instantiating this object transparently changes how |
| 15 // the entire //sql/ subsystem works in the process of the caller; all paths |
| 16 // are treated as relative to |directory|. |
| 17 class ScopedMojoFilesystemVFS { |
| 18 public: |
| 19 explicit ScopedMojoFilesystemVFS(filesystem::DirectoryPtr directory); |
| 20 ~ScopedMojoFilesystemVFS(); |
| 21 |
| 22 // Returns the directory of the current VFS. |
| 23 filesystem::DirectoryPtr& GetDirectory(); |
| 24 |
| 25 private: |
| 26 DISALLOW_COPY_AND_ASSIGN(ScopedMojoFilesystemVFS); |
| 27 }; |
| 28 |
| 29 } // namespace sql |
| 30 |
| 31 #endif // SQL_MOJO_ENABLE_MOJO_FS_H_ |
OLD | NEW |