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 #include "files/public/c/lib/singletons.h" | 5 #include "files/c/lib/singletons.h" |
6 | 6 |
7 #include <errno.h> | 7 #include <errno.h> |
8 | 8 |
9 #include "files/public/c/lib/directory_wrapper.h" | 9 #include "files/c/lib/directory_wrapper.h" |
10 #include "files/public/c/lib/fd_table.h" | 10 #include "files/c/lib/fd_table.h" |
11 #include "files/public/c/lib/real_errno_impl.h" | 11 #include "files/c/lib/real_errno_impl.h" |
12 #include "files/public/c/mojio_config.h" | 12 #include "files/c/mojio_config.h" |
13 #include "mojo/public/cpp/environment/logging.h" | 13 #include "mojo/public/cpp/environment/logging.h" |
14 | 14 |
15 namespace mojio { | 15 namespace mojio { |
16 namespace singletons { | 16 namespace singletons { |
17 | 17 |
18 namespace { | 18 namespace { |
19 | 19 |
20 RealErrnoImpl* g_errno_impl = nullptr; | 20 RealErrnoImpl* g_errno_impl = nullptr; |
21 FDTable* g_fd_table = nullptr; | 21 FDTable* g_fd_table = nullptr; |
22 DirectoryWrapper* g_current_working_directory = nullptr; | 22 DirectoryWrapper* g_current_working_directory = nullptr; |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
67 } | 67 } |
68 | 68 |
69 void ResetCurrentWorkingDirectory() { | 69 void ResetCurrentWorkingDirectory() { |
70 ErrnoImpl::Setter errno_setter(GetErrnoImpl()); // Protect errno. | 70 ErrnoImpl::Setter errno_setter(GetErrnoImpl()); // Protect errno. |
71 delete g_current_working_directory; | 71 delete g_current_working_directory; |
72 g_current_working_directory = nullptr; | 72 g_current_working_directory = nullptr; |
73 } | 73 } |
74 | 74 |
75 } // namespace singletons | 75 } // namespace singletons |
76 } // namespace mojio | 76 } // namespace mojio |
OLD | NEW |