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_tracker.cc | |
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_tracker.cc')
-rw-r--r-- | webkit/fileapi/file_system_usage_tracker.cc | 20 |
1 files changed, 1 insertions, 19 deletions
diff --git a/webkit/fileapi/file_system_usage_tracker.cc b/webkit/fileapi/file_system_usage_tracker.cc index 9456f2a..f58e4aa 100644 --- a/webkit/fileapi/file_system_usage_tracker.cc +++ b/webkit/fileapi/file_system_usage_tracker.cc @@ -14,7 +14,6 @@ #include "base/task.h" #include "googleurl/src/gurl.h" #include "webkit/fileapi/file_system_path_manager.h" -#include "webkit/fileapi/file_system_usage_cache.h" namespace fileapi { @@ -53,24 +52,7 @@ class FileSystemUsageTracker::GetUsageTask void RunOnFileThread() { DCHECK(file_message_loop_->BelongsToCurrentThread()); - if (!file_util::DirectoryExists(origin_base_path_)) - fs_usage_ = 0; - else { - FilePath usage_file_path = origin_base_path_.AppendASCII( - FileSystemUsageCache::kUsageFileName); - fs_usage_ = FileSystemUsageCache::GetUsage(usage_file_path); - - if (fs_usage_ < 0) { - FilePath content_file_path = origin_base_path_; - if (FileSystemUsageCache::Exists(usage_file_path)) - FileSystemUsageCache::Delete(usage_file_path); - fs_usage_ = file_util::ComputeDirectorySize(content_file_path); - // fs_usage_ will include the size of .usage. - // The result of ComputeDirectorySize does not include it. - fs_usage_ += FileSystemUsageCache::kUsageFileSize; - FileSystemUsageCache::UpdateUsage(usage_file_path, fs_usage_); - } - } + // TODO(dmikurube): add the code that retrieves the origin usage here. original_message_loop_->PostTask( FROM_HERE, NewRunnableMethod(this, &GetUsageTask::Completed)); |