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

Unified Diff: trunk/src/webkit/browser/fileapi/quota/quota_reservation_buffer.cc

Issue 64883003: Revert 233815 "Quota: Implement QuotaBackendImpl" (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 7 years, 1 month 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
Index: trunk/src/webkit/browser/fileapi/quota/quota_reservation_buffer.cc
===================================================================
--- trunk/src/webkit/browser/fileapi/quota/quota_reservation_buffer.cc (revision 233827)
+++ trunk/src/webkit/browser/fileapi/quota/quota_reservation_buffer.cc (working copy)
@@ -26,7 +26,7 @@
type_(type),
reserved_quota_(0) {
DCHECK(sequence_checker_.CalledOnValidSequencedThread());
- reservation_manager_->IncrementDirtyCount(origin, type);
+ reservation_manager_->IncreaseDirtyCount(origin, type);
}
scoped_refptr<QuotaReservation> QuotaReservationBuffer::CreateReservation() {
@@ -49,8 +49,11 @@
DCHECK(sequence_checker_.CalledOnValidSequencedThread());
if (!reservation_manager_)
return;
- reservation_manager_->CommitQuotaUsage(origin_, type_, usage_delta);
+ reservation_manager_->CommitQuotaUsage(
+ origin_, type_, usage_delta,
+ base::Bind(&IgnoreResult));
+
DCHECK_LE(quota_consumption, reserved_quota_);
if (quota_consumption > 0) {
reserved_quota_ -= quota_consumption;
@@ -81,20 +84,20 @@
if (reserved_quota_ && reservation_manager_) {
reservation_manager_->ReserveQuota(
origin_, type_, -reserved_quota_,
- base::Bind(&QuotaReservationBuffer::DecrementDirtyCount,
+ base::Bind(&QuotaReservationBuffer::DecreaseDirtyCount,
reservation_manager_, origin_, type_));
}
reservation_manager_->ReleaseReservationBuffer(this);
}
// static
-bool QuotaReservationBuffer::DecrementDirtyCount(
+bool QuotaReservationBuffer::DecreaseDirtyCount(
base::WeakPtr<QuotaReservationManager> reservation_manager,
const GURL& origin,
FileSystemType type,
base::PlatformFileError error) {
if (error == base::PLATFORM_FILE_OK && reservation_manager) {
- reservation_manager->DecrementDirtyCount(origin, type);
+ reservation_manager->DecreaseDirtyCount(origin, type);
return true;
}
return false;

Powered by Google App Engine
This is Rietveld 408576698