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

Side by Side Diff: mojo/services/files/public/c/lib/singletons.h

Issue 1388413005: Move //mojo/services/X/public/... to //mojo/services/X/... (part 1). (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years, 2 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 SERVICES_FILES_C_LIB_SINGLETONS_H_
6 #define SERVICES_FILES_C_LIB_SINGLETONS_H_
7
8 #include "files/public/interfaces/directory.mojom.h"
9
10 namespace mojio {
11
12 class DirectoryWrapper;
13 class ErrnoImpl;
14 class FDTable;
15
16 namespace singletons {
17
18 // Gets the singleton |ErrnoImpl| (creating it if necessary), which gets/sets
19 // the "real" errno.
20 ErrnoImpl* GetErrnoImpl();
21 // Resets (destroys) the singleton |ErrnoImpl|. Warning: Do not call this unless
22 // things relying on the singleton |ErrnoImpl| have been reset first.
23 void ResetErrnoImpl();
24
25 // Gets the singleton |FDTable| (creating it if necessary, using
26 // MOJIO_CONFIG_MAX_NUM_FDS and the singleton |ErrnoImpl|).
27 FDTable* GetFDTable();
28 // Resets (destroys) the singleton |FDTable|.
29 void ResetFDTable();
30
31 // Explicitly set the singleton current working directory to |directory| (which
32 // should be valid). (The singleton |DirectoryWrapper| will be reset if
33 // necessary.) This uses the singleton |ErrnoImpl|.
34 void SetCurrentWorkingDirectory(mojo::files::DirectoryPtr directory);
35 // Gets the current working directory (i.e., the singleton |DirectoryWrapper|).
36 // WARNING!!! This returns null if it was not previously set (see above) or has
37 // been reset, in which case it will also use the singleton |ErrnoImpl| (to set
38 // errno).
39 DirectoryWrapper* GetCurrentWorkingDirectory();
40 // Resets (destroys) the singleton |DirectoryWrapper|.
41 void ResetCurrentWorkingDirectory();
42
43 } // namespace singletons
44 } // namespace mojio
45
46 #endif // SERVICES_FILES_C_LIB_SINGLETONS_H_
OLDNEW
« no previous file with comments | « mojo/services/files/public/c/lib/real_errno_impl.cc ('k') | mojo/services/files/public/c/lib/singletons.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698