| OLD | NEW |
| 1 // Copyright (c) 2012 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 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 #include "webkit/storage/webkit_storage_export.h" |
| 11 | 11 |
| 12 namespace fileapi { | 12 namespace fileapi { |
| 13 | 13 |
| 14 class FILEAPI_EXPORT_PRIVATE FileSystemUsageCache { | 14 class WEBKIT_STORAGE_EXPORT_PRIVATE FileSystemUsageCache { |
| 15 public: | 15 public: |
| 16 // 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 |
| 17 // 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 |
| 18 // available. | 18 // available. |
| 19 static int64 GetUsage(const FilePath& usage_file_path); | 19 static int64 GetUsage(const FilePath& usage_file_path); |
| 20 | 20 |
| 21 // Gets the dirty count in the .usage file. | 21 // Gets the dirty count in the .usage file. |
| 22 // Returns less than zero if the .usage file is not available. | 22 // Returns less than zero if the .usage file is not available. |
| 23 static int32 GetDirty(const FilePath& usage_file_path); | 23 static int32 GetDirty(const FilePath& usage_file_path); |
| 24 | 24 |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 57 | 57 |
| 58 static int Write(const FilePath& usage_file_path, | 58 static int Write(const FilePath& usage_file_path, |
| 59 bool is_valid, | 59 bool is_valid, |
| 60 uint32 dirty, | 60 uint32 dirty, |
| 61 int64 fs_usage); | 61 int64 fs_usage); |
| 62 }; | 62 }; |
| 63 | 63 |
| 64 } // namespace fileapi | 64 } // namespace fileapi |
| 65 | 65 |
| 66 #endif // WEBKIT_FILEAPI_FILE_SYSTEM_USAGE_CACHE_H_ | 66 #endif // WEBKIT_FILEAPI_FILE_SYSTEM_USAGE_CACHE_H_ |
| OLD | NEW |