Index: webkit/fileapi/quota_file_util.cc |
diff --git a/webkit/fileapi/quota_file_util.cc b/webkit/fileapi/quota_file_util.cc |
index 2ab4f79b934c7f4560349a8bf6cef3b33f712970..613eb495936e9c228d81b67382a619c6f84097fe 100644 |
--- a/webkit/fileapi/quota_file_util.cc |
+++ b/webkit/fileapi/quota_file_util.cc |
@@ -46,9 +46,9 @@ bool CanCopy( |
} |
// A helper class to hook quota_util() methods before and after modifications. |
-class ScopedOriginUpdateHelper { |
+class OriginUpdateHelper { |
public: |
- explicit ScopedOriginUpdateHelper( |
+ explicit OriginUpdateHelper( |
FileSystemOperationContext* operation_context, |
const GURL& origin_url, |
FileSystemType type) |
@@ -62,13 +62,9 @@ class ScopedOriginUpdateHelper { |
operation_context_->file_system_context()->GetQuotaUtil(type_); |
quota_manager_proxy_ = |
operation_context_->file_system_context()->quota_manager_proxy(); |
- if (quota_util_) |
- quota_util_->StartUpdateOriginOnFileThread(origin_url_, type_); |
} |
- ~ScopedOriginUpdateHelper() { |
- if (quota_util_) |
- quota_util_->EndUpdateOriginOnFileThread(origin_url_, type_); |
+ ~OriginUpdateHelper() { |
} |
void NotifyUpdate(int64 growth) { |
@@ -85,7 +81,7 @@ class ScopedOriginUpdateHelper { |
QuotaManagerProxy* quota_manager_proxy_; |
const GURL& origin_url_; |
FileSystemType type_; |
- DISALLOW_COPY_AND_ASSIGN(ScopedOriginUpdateHelper); |
+ DISALLOW_COPY_AND_ASSIGN(OriginUpdateHelper); |
}; |
} // namespace (anonymous) |
@@ -111,7 +107,7 @@ base::PlatformFileError QuotaFileUtil::CopyOrMoveFile( |
// TODO(kinuko): For cross-filesystem move case we need 2 helpers, one for |
// src and one for dest. |
- ScopedOriginUpdateHelper helper( |
+ OriginUpdateHelper helper( |
kinuko
2011/08/25 09:12:00
If all we do is calling NotifyUpdate() it looks li
Dai Mikurube (NOT FULLTIME)
2011/08/25 09:19:46
Ah, exactly. I'll modify it in the next change.
|
fs_context, |
fs_context->dest_origin_url(), |
fs_context->dest_type()); |
@@ -148,7 +144,7 @@ base::PlatformFileError QuotaFileUtil::DeleteFile( |
FileSystemOperationContext* fs_context, |
const FilePath& file_path) { |
DCHECK(fs_context); |
- ScopedOriginUpdateHelper helper( |
+ OriginUpdateHelper helper( |
fs_context, |
fs_context->src_origin_url(), |
fs_context->src_type()); |
@@ -173,7 +169,7 @@ base::PlatformFileError QuotaFileUtil::Truncate( |
const FilePath& path, |
int64 length) { |
int64 allowed_bytes_growth = fs_context->allowed_bytes_growth(); |
- ScopedOriginUpdateHelper helper( |
+ OriginUpdateHelper helper( |
fs_context, |
fs_context->src_origin_url(), |
fs_context->src_type()); |