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

Side by Side Diff: sql/mojo/enable_mojo_fs.h

Issue 1176653002: mandoline filesystem: add a sqlite3 vfs to proxy filesystem usage. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Merge with ToT and fix the test import. Created 5 years, 6 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 unified diff | Download patch
OLDNEW
(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_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698