diff options
author | thakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-03-02 20:08:18 +0000 |
---|---|---|
committer | thakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-03-02 20:08:18 +0000 |
commit | fcc35653955e36b6a6d9cab579ba548e44d0fce1 (patch) | |
tree | c7f08a2aa850c40ade93e47f8ed690c719505e65 /webkit/fileapi/file_system_usage_cache.h | |
parent | 834f9def130038aeb8ff8fbf3d55c37a31ec319e (diff) | |
download | chromium_src-fcc35653955e36b6a6d9cab579ba548e44d0fce1.zip chromium_src-fcc35653955e36b6a6d9cab579ba548e44d0fce1.tar.gz chromium_src-fcc35653955e36b6a6d9cab579ba548e44d0fce1.tar.bz2 |
Revert 76578 (accidental commit by the commit bot) - Add a function for usage tracking. It's based on the bug 6426001.
BUG=
TEST=
Review URL: http://codereview.chromium.org/6453001
TBR=dmikurube@google.com
Review URL: http://codereview.chromium.org/6588129
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@76594 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/fileapi/file_system_usage_cache.h')
-rw-r--r-- | webkit/fileapi/file_system_usage_cache.h | 46 |
1 files changed, 0 insertions, 46 deletions
diff --git a/webkit/fileapi/file_system_usage_cache.h b/webkit/fileapi/file_system_usage_cache.h deleted file mode 100644 index 32fc9b8..0000000 --- a/webkit/fileapi/file_system_usage_cache.h +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#ifndef WEBKIT_FILEAPI_FILE_SYSTEM_USAGE_CACHE_H_ -#define WEBKIT_FILEAPI_FILE_SYSTEM_USAGE_CACHE_H_ - -#include "base/basictypes.h" -#include "base/file_path.h" - -namespace fileapi { - -class FileSystemUsageCache { - public: - // Gets the size described in the .usage file. - // Returns less than zero if the size is not availble. - static int64 GetUsage(const FilePath& usage_file_path); - - // Increments or decrements the "dirty" entry in the .usage file. - // Returns false if no .usage is available. - static bool IncrementDirty(const FilePath& usage_file_path); - static bool DecrementDirty(const FilePath& usage_file_path); - - // Updates the size described in the .usage file. - static int UpdateUsage(const FilePath& usage_file_path, int64 fs_usage); - - static bool Exists(const FilePath& usage_file_path); - static bool Delete(const FilePath& usage_file_path); - - static const char kUsageFileName[]; - static const char kUsageFileHeader[]; - static const int kUsageFileSize; - static const int kUsageFileHeaderSize; - - private: - // Read the size and the "dirty" entry described in the .usage file. - // Returns less than zero if no .usage file is available. - static int64 Read(const FilePath& usage_file_path, uint32* dirty); - - static int Write(const FilePath& usage_file_path, - uint32 dirty, int64 fs_usage); -}; - -} // namespace fileapi - -#endif // WEBKIT_FILEAPI_FILE_SYSTEM_USAGE_CACHE_H_ |