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

Side by Side Diff: webkit/browser/fileapi/quota/quota_reservation_manager.cc

Issue 61593002: Quota: Implement QuotaBackendImpl (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix build and test 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "webkit/browser/fileapi/quota/quota_reservation_manager.h" 5 #include "webkit/browser/fileapi/quota/quota_reservation_manager.h"
6 6
7 #include "webkit/browser/fileapi/quota/quota_reservation.h" 7 #include "webkit/browser/fileapi/quota/quota_reservation.h"
8 #include "webkit/browser/fileapi/quota/quota_reservation_buffer.h" 8 #include "webkit/browser/fileapi/quota/quota_reservation_buffer.h"
9 9
10 namespace fileapi { 10 namespace fileapi {
(...skipping 24 matching lines...) Expand all
35 } 35 }
36 36
37 void QuotaReservationManager::CommitQuotaUsage( 37 void QuotaReservationManager::CommitQuotaUsage(
38 const GURL& origin, 38 const GURL& origin,
39 FileSystemType type, 39 FileSystemType type,
40 int64 delta, 40 int64 delta,
41 const StatusCallback& callback) { 41 const StatusCallback& callback) {
42 backend_->CommitQuotaUsage(origin, type, delta, callback); 42 backend_->CommitQuotaUsage(origin, type, delta, callback);
43 } 43 }
44 44
45 void QuotaReservationManager::IncreaseDirtyCount(const GURL& origin, 45 void QuotaReservationManager::IncrementDirtyCount(const GURL& origin,
46 FileSystemType type) { 46 FileSystemType type) {
47 backend_->IncreaseDirtyCount(origin, type); 47 backend_->IncrementDirtyCount(origin, type);
48 } 48 }
49 49
50 void QuotaReservationManager::DecreaseDirtyCount(const GURL& origin, 50 void QuotaReservationManager::DecrementDirtyCount(const GURL& origin,
51 FileSystemType type) { 51 FileSystemType type) {
52 backend_->DecreaseDirtyCount(origin, type); 52 backend_->DecrementDirtyCount(origin, type);
53 } 53 }
54 54
55 scoped_refptr<QuotaReservationBuffer> 55 scoped_refptr<QuotaReservationBuffer>
56 QuotaReservationManager::GetReservationBuffer( 56 QuotaReservationManager::GetReservationBuffer(
57 const GURL& origin, 57 const GURL& origin,
58 FileSystemType type) { 58 FileSystemType type) {
59 DCHECK(sequence_checker_.CalledOnValidSequencedThread()); 59 DCHECK(sequence_checker_.CalledOnValidSequencedThread());
60 QuotaReservationBuffer** buffer = 60 QuotaReservationBuffer** buffer =
61 &reservation_buffers_[std::make_pair(origin, type)]; 61 &reservation_buffers_[std::make_pair(origin, type)];
62 if (!*buffer) { 62 if (!*buffer) {
(...skipping 12 matching lines...) Expand all
75 reservation_buffers_.erase(key); 75 reservation_buffers_.erase(key);
76 } 76 }
77 77
78 scoped_refptr<QuotaReservation> QuotaReservationManager::CreateReservation( 78 scoped_refptr<QuotaReservation> QuotaReservationManager::CreateReservation(
79 const GURL& origin, 79 const GURL& origin,
80 FileSystemType type) { 80 FileSystemType type) {
81 return GetReservationBuffer(origin, type)->CreateReservation();; 81 return GetReservationBuffer(origin, type)->CreateReservation();;
82 } 82 }
83 83
84 } // namespace fileapi 84 } // namespace fileapi
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698