Index: webkit/fileapi/syncable/canned_syncable_file_system.cc |
diff --git a/webkit/fileapi/syncable/canned_syncable_file_system.cc b/webkit/fileapi/syncable/canned_syncable_file_system.cc |
index d78c328b76727538b5fdf76ff4e1d5951cbbb570..2f8a58466eba312d8498ea1181b27b5121d0ea19 100644 |
--- a/webkit/fileapi/syncable/canned_syncable_file_system.cc |
+++ b/webkit/fileapi/syncable/canned_syncable_file_system.cc |
@@ -89,6 +89,15 @@ class WriteHelper { |
int64 bytes_written_; |
}; |
+void DidGetUsageAndQuota(const quota::StatusCallback& callback, |
+ int64* usage_out, int64* quota_out, |
+ quota::QuotaStatusCode status, |
+ int64 usage, int64 quota) { |
+ *usage_out = usage; |
+ *quota_out = quota; |
+ callback.Run(status); |
+} |
+ |
} // namespace |
CannedSyncableFileSystem::CannedSyncableFileSystem( |
@@ -265,6 +274,15 @@ PlatformFileError CannedSyncableFileSystem::DeleteFileSystem() { |
test_helper_.type())); |
} |
+quota::QuotaStatusCode CannedSyncableFileSystem::GetUsageAndQuota( |
+ int64* usage, int64* quota) { |
+ return RunOnThread<quota::QuotaStatusCode>( |
+ io_task_runner_, |
+ FROM_HERE, |
+ base::Bind(&CannedSyncableFileSystem::DoGetUsageAndQuota, |
+ base::Unretained(this), usage, quota)); |
+} |
+ |
FileSystemOperation* CannedSyncableFileSystem::NewOperation() { |
return file_system_context_->CreateFileSystemOperation(URL(""), NULL); |
} |
@@ -337,6 +355,16 @@ void CannedSyncableFileSystem::DoWrite( |
base::Owned(helper), callback)); |
} |
+void CannedSyncableFileSystem::DoGetUsageAndQuota( |
+ int64* usage, |
+ int64* quota, |
+ const quota::StatusCallback& callback) { |
+ quota_manager_->GetUsageAndQuota( |
+ test_helper_.origin(), |
+ test_helper_.storage_type(), |
+ base::Bind(&DidGetUsageAndQuota, callback, usage, quota)); |
+} |
+ |
void CannedSyncableFileSystem::DidOpenFileSystem( |
PlatformFileError result, const std::string& name, const GURL& root) { |
result_ = result; |