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 "components/filesystem/directory_impl.h" | 5 #include "components/filesystem/directory_impl.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/files/file.h" | 9 #include "base/files/file.h" |
10 #include "base/files/file_enumerator.h" | 10 #include "base/files/file_enumerator.h" |
11 #include "base/files/file_util.h" | 11 #include "base/files/file_util.h" |
12 #include "base/files/scoped_temp_dir.h" | 12 #include "base/files/scoped_temp_dir.h" |
13 #include "base/logging.h" | 13 #include "base/logging.h" |
| 14 #include "base/memory/ptr_util.h" |
14 #include "build/build_config.h" | 15 #include "build/build_config.h" |
15 #include "components/filesystem/file_impl.h" | 16 #include "components/filesystem/file_impl.h" |
16 #include "components/filesystem/lock_table.h" | 17 #include "components/filesystem/lock_table.h" |
17 #include "components/filesystem/util.h" | 18 #include "components/filesystem/util.h" |
18 #include "mojo/common/common_type_converters.h" | 19 #include "mojo/common/common_type_converters.h" |
19 #include "mojo/public/cpp/bindings/strong_binding.h" | 20 #include "mojo/public/cpp/bindings/strong_binding.h" |
20 | 21 |
21 namespace filesystem { | 22 namespace filesystem { |
22 | 23 |
23 DirectoryImpl::DirectoryImpl(base::FilePath directory_path, | 24 DirectoryImpl::DirectoryImpl(base::FilePath directory_path, |
(...skipping 321 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
345 // We must not return directories as files. In the file abstraction, we | 346 // We must not return directories as files. In the file abstraction, we |
346 // can fetch raw file descriptors over mojo pipes, and passing a file | 347 // can fetch raw file descriptors over mojo pipes, and passing a file |
347 // descriptor to a directory is a sandbox escape on Windows. | 348 // descriptor to a directory is a sandbox escape on Windows. |
348 return base::File(base::File::FILE_ERROR_NOT_A_FILE); | 349 return base::File(base::File::FILE_ERROR_NOT_A_FILE); |
349 } | 350 } |
350 | 351 |
351 return base::File(path, open_flags); | 352 return base::File(path, open_flags); |
352 } | 353 } |
353 | 354 |
354 } // namespace filesystem | 355 } // namespace filesystem |
OLD | NEW |