Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(384)

Unified Diff: webkit/fileapi/file_system_context.cc

Issue 7003021: Added DeleteOriginData to QuotaClient (Closed)
Patch Set: '' Created 9 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webkit/fileapi/file_system_context.h ('k') | webkit/fileapi/sandbox_quota_client.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/fileapi/file_system_context.cc
diff --git a/webkit/fileapi/file_system_context.cc b/webkit/fileapi/file_system_context.cc
index d27b87d0f6f6bd17b0bb1266e70d8c776fd88bfc..97b118177154db6d928a53f045b877ecf4abf506 100644
--- a/webkit/fileapi/file_system_context.cc
+++ b/webkit/fileapi/file_system_context.cc
@@ -70,14 +70,24 @@ bool FileSystemContext::IsStorageUnlimited(const GURL& origin) {
special_storage_policy_->IsStorageUnlimited(origin));
}
-void FileSystemContext::DeleteDataForOriginOnFileThread(
+bool FileSystemContext::DeleteDataForOriginOnFileThread(
const GURL& origin_url) {
- DCHECK(path_manager_.get());
DCHECK(file_message_loop_->BelongsToCurrentThread());
+ // TODO(tzik): Report the amount of deleted data to QuotaManager.
FilePath path_for_origin =
sandbox_provider()->GetBaseDirectoryForOrigin(origin_url);
- file_util::Delete(path_for_origin, true /* recursive */);
+ return file_util::Delete(path_for_origin, true /* recursive */);
+}
+
+bool FileSystemContext::DeleteDataForOriginAndTypeOnFileThread(
+ const GURL& origin_url, FileSystemType type) {
+ DCHECK(file_message_loop_->BelongsToCurrentThread());
+ // TODO(tzik): ditto. Report the amount of deleted data to QuotaManager.
+
+ FilePath path_for_origin =
+ sandbox_provider()->GetBaseDirectoryForOriginAndType(origin_url, type);
+ return file_util::Delete(path_for_origin, true /* recursive */);
}
void FileSystemContext::DeleteOnCorrectThread() const {
« no previous file with comments | « webkit/fileapi/file_system_context.h ('k') | webkit/fileapi/sandbox_quota_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698