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

Side by Side Diff: base/files/dir_reader_posix.h

Issue 10413022: Move dir_reader to base/files (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix linux Created 8 years, 5 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 | Annotate | Revision Log
« no previous file with comments | « base/files/dir_reader_linux.h ('k') | base/files/dir_reader_posix_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #ifndef BASE_DIR_READER_POSIX_H_ 5 #ifndef BASE_FILES_DIR_READER_POSIX_H_
6 #define BASE_DIR_READER_POSIX_H_ 6 #define BASE_FILES_DIR_READER_POSIX_H_
7 #pragma once 7 #pragma once
8 8
9 #include "build/build_config.h" 9 #include "build/build_config.h"
10 10
11 // This header provides a class, DirReaderPosix, which allows one to open and 11 // This header provides a class, DirReaderPosix, which allows one to open and
12 // read from directories without allocating memory. For the interface, see 12 // read from directories without allocating memory. For the interface, see
13 // the generic fallback in dir_reader_fallback.h. 13 // the generic fallback in dir_reader_fallback.h.
14 14
15 // Mac note: OS X has getdirentries, but it only works if we restrict Chrome to 15 // Mac note: OS X has getdirentries, but it only works if we restrict Chrome to
16 // 32-bit inodes. There is a getdirentries64 syscall in 10.6, but it's not 16 // 32-bit inodes. There is a getdirentries64 syscall in 10.6, but it's not
17 // wrapped and the direct syscall interface is unstable. Using an unstable API 17 // wrapped and the direct syscall interface is unstable. Using an unstable API
18 // seems worse than falling back to enumerating all file descriptors so we will 18 // seems worse than falling back to enumerating all file descriptors so we will
19 // probably never implement this on the Mac. 19 // probably never implement this on the Mac.
20 20
21 #if defined(OS_LINUX) 21 #if defined(OS_LINUX)
22 #include "base/dir_reader_linux.h" 22 #include "base/files/dir_reader_linux.h"
23 #else 23 #else
24 #include "base/dir_reader_fallback.h" 24 #include "base/files/dir_reader_fallback.h"
25 #endif 25 #endif
26 26
27 namespace base { 27 namespace base {
28 28
29 #if defined(OS_LINUX) 29 #if defined(OS_LINUX)
30 typedef DirReaderLinux DirReaderPosix; 30 typedef DirReaderLinux DirReaderPosix;
31 #else 31 #else
32 typedef DirReaderFallback DirReaderPosix; 32 typedef DirReaderFallback DirReaderPosix;
33 #endif 33 #endif
34 34
35 } // namespace base 35 } // namespace base
36 36
37 #endif // BASE_DIR_READER_POSIX_H_ 37 #endif // BASE_FILES_DIR_READER_POSIX_H_
OLDNEW
« no previous file with comments | « base/files/dir_reader_linux.h ('k') | base/files/dir_reader_posix_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698