OLD | NEW |
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 #ifndef WEBKIT_FILEAPI_FILE_SYSTEM_USAGE_CACHE_H_ | 5 #ifndef WEBKIT_FILEAPI_FILE_SYSTEM_USAGE_CACHE_H_ |
6 #define WEBKIT_FILEAPI_FILE_SYSTEM_USAGE_CACHE_H_ | 6 #define WEBKIT_FILEAPI_FILE_SYSTEM_USAGE_CACHE_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/file_path.h" | 9 #include "base/file_path.h" |
| 10 #include "webkit/fileapi/fileapi_export.h" |
10 | 11 |
11 namespace fileapi { | 12 namespace fileapi { |
12 | 13 |
13 class FileSystemUsageCache { | 14 class FILEAPI_EXPORT_PRIVATE FileSystemUsageCache { |
14 public: | 15 public: |
15 // Gets the size described in the .usage file even if dirty > 0 or | 16 // Gets the size described in the .usage file even if dirty > 0 or |
16 // is_valid == false. Returns less than zero if the .usage file is not | 17 // is_valid == false. Returns less than zero if the .usage file is not |
17 // available. | 18 // available. |
18 static int64 GetUsage(const FilePath& usage_file_path); | 19 static int64 GetUsage(const FilePath& usage_file_path); |
19 | 20 |
20 // Gets the dirty count in the .usage file. | 21 // Gets the dirty count in the .usage file. |
21 // Returns less than zero if the .usage file is not available. | 22 // Returns less than zero if the .usage file is not available. |
22 static int32 GetDirty(const FilePath& usage_file_path); | 23 static int32 GetDirty(const FilePath& usage_file_path); |
23 | 24 |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
56 | 57 |
57 static int Write(const FilePath& usage_file_path, | 58 static int Write(const FilePath& usage_file_path, |
58 bool is_valid, | 59 bool is_valid, |
59 uint32 dirty, | 60 uint32 dirty, |
60 int64 fs_usage); | 61 int64 fs_usage); |
61 }; | 62 }; |
62 | 63 |
63 } // namespace fileapi | 64 } // namespace fileapi |
64 | 65 |
65 #endif // WEBKIT_FILEAPI_FILE_SYSTEM_USAGE_CACHE_H_ | 66 #endif // WEBKIT_FILEAPI_FILE_SYSTEM_USAGE_CACHE_H_ |
OLD | NEW |