summaryrefslogtreecommitdiffstats
path: root/webkit/fileapi/file_system_usage_tracker.cc
diff options
context:
space:
mode:
Diffstat (limited to 'webkit/fileapi/file_system_usage_tracker.cc')
-rw-r--r--webkit/fileapi/file_system_usage_tracker.cc20
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));