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

Side by Side Diff: base/file_util_linux.cc

Issue 12278014: Make base compile with no "using base::FilePath". (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 7 years, 10 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/file_util.cc ('k') | base/file_util_posix.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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "base/file_util.h" 5 #include "base/file_util.h"
6 6
7 #include "base/file_path.h" 7 #include "base/file_path.h"
8 8
9 #include <errno.h> 9 #include <errno.h>
10 #include <sys/vfs.h> 10 #include <sys/vfs.h>
11 11
12 namespace file_util { 12 namespace file_util {
13 13
14 bool GetFileSystemType(const FilePath& path, FileSystemType* type) { 14 bool GetFileSystemType(const base::FilePath& path, FileSystemType* type) {
15 struct statfs statfs_buf; 15 struct statfs statfs_buf;
16 if (statfs(path.value().c_str(), &statfs_buf) < 0) { 16 if (statfs(path.value().c_str(), &statfs_buf) < 0) {
17 if (errno == ENOENT) 17 if (errno == ENOENT)
18 return false; 18 return false;
19 *type = FILE_SYSTEM_UNKNOWN; 19 *type = FILE_SYSTEM_UNKNOWN;
20 return true; 20 return true;
21 } 21 }
22 22
23 // While you would think the possible values of f_type would be available 23 // While you would think the possible values of f_type would be available
24 // in a header somewhere, it appears that is not the case. These values 24 // in a header somewhere, it appears that is not the case. These values
(...skipping 28 matching lines...) Expand all
53 case 0x27e0eb: // CGROUP 53 case 0x27e0eb: // CGROUP
54 *type = FILE_SYSTEM_CGROUP; 54 *type = FILE_SYSTEM_CGROUP;
55 break; 55 break;
56 default: 56 default:
57 *type = FILE_SYSTEM_OTHER; 57 *type = FILE_SYSTEM_OTHER;
58 } 58 }
59 return true; 59 return true;
60 } 60 }
61 61
62 } // namespace 62 } // namespace
OLDNEW
« no previous file with comments | « base/file_util.cc ('k') | base/file_util_posix.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698