| OLD | NEW |
| 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 #ifndef STORAGE_BROWSER_FILEAPI_QUOTA_QUOTA_RESERVATION_MANAGER_H_ | 5 #ifndef STORAGE_BROWSER_FILEAPI_QUOTA_QUOTA_RESERVATION_MANAGER_H_ |
| 6 #define STORAGE_BROWSER_FILEAPI_QUOTA_QUOTA_RESERVATION_MANAGER_H_ | 6 #define STORAGE_BROWSER_FILEAPI_QUOTA_QUOTA_RESERVATION_MANAGER_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <map> | 10 #include <map> |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 #include "url/gurl.h" | 21 #include "url/gurl.h" |
| 22 | 22 |
| 23 namespace content { | 23 namespace content { |
| 24 class QuotaReservationManagerTest; | 24 class QuotaReservationManagerTest; |
| 25 } | 25 } |
| 26 | 26 |
| 27 namespace storage { | 27 namespace storage { |
| 28 | 28 |
| 29 class QuotaReservation; | 29 class QuotaReservation; |
| 30 class QuotaReservationBuffer; | 30 class QuotaReservationBuffer; |
| 31 class OpenFileHandle; | |
| 32 class OpenFileHandleContext; | |
| 33 | 31 |
| 34 class STORAGE_EXPORT QuotaReservationManager { | 32 class STORAGE_EXPORT QuotaReservationManager { |
| 35 public: | 33 public: |
| 36 // Callback for ReserveQuota. When this callback returns false, ReserveQuota | 34 // Callback for ReserveQuota. When this callback returns false, ReserveQuota |
| 37 // operation should be reverted. | 35 // operation should be reverted. |
| 38 typedef base::Callback<bool(base::File::Error error, int64_t delta)> | 36 typedef base::Callback<bool(base::File::Error error, int64_t delta)> |
| 39 ReserveQuotaCallback; | 37 ReserveQuotaCallback; |
| 40 | 38 |
| 41 // An abstraction of backing quota system. | 39 // An abstraction of backing quota system. |
| 42 class STORAGE_EXPORT QuotaBackend { | 40 class STORAGE_EXPORT QuotaBackend { |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 119 | 117 |
| 120 base::SequenceChecker sequence_checker_; | 118 base::SequenceChecker sequence_checker_; |
| 121 base::WeakPtrFactory<QuotaReservationManager> weak_ptr_factory_; | 119 base::WeakPtrFactory<QuotaReservationManager> weak_ptr_factory_; |
| 122 | 120 |
| 123 DISALLOW_COPY_AND_ASSIGN(QuotaReservationManager); | 121 DISALLOW_COPY_AND_ASSIGN(QuotaReservationManager); |
| 124 }; | 122 }; |
| 125 | 123 |
| 126 } // namespace storage | 124 } // namespace storage |
| 127 | 125 |
| 128 #endif // STORAGE_BROWSER_FILEAPI_QUOTA_QUOTA_RESERVATION_MANAGER_H_ | 126 #endif // STORAGE_BROWSER_FILEAPI_QUOTA_QUOTA_RESERVATION_MANAGER_H_ |
| OLD | NEW |