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

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

Issue 498273002: Rename storage-related export macros and build targets (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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 unified diff | Download patch
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 #ifndef WEBKIT_BROWSER_FILEAPI_QUOTA_QUOTA_RESERVATION_MANAGER_H_ 5 #ifndef WEBKIT_BROWSER_FILEAPI_QUOTA_QUOTA_RESERVATION_MANAGER_H_
6 #define WEBKIT_BROWSER_FILEAPI_QUOTA_QUOTA_RESERVATION_MANAGER_H_ 6 #define WEBKIT_BROWSER_FILEAPI_QUOTA_QUOTA_RESERVATION_MANAGER_H_
7 7
8 #include <map> 8 #include <map>
9 #include <utility> 9 #include <utility>
10 10
11 #include "base/basictypes.h" 11 #include "base/basictypes.h"
12 #include "base/callback_forward.h" 12 #include "base/callback_forward.h"
13 #include "base/files/file.h" 13 #include "base/files/file.h"
14 #include "base/memory/ref_counted.h" 14 #include "base/memory/ref_counted.h"
15 #include "base/memory/weak_ptr.h" 15 #include "base/memory/weak_ptr.h"
16 #include "url/gurl.h" 16 #include "url/gurl.h"
17 #include "webkit/browser/webkit_storage_browser_export.h" 17 #include "webkit/browser/storage_export.h"
18 #include "webkit/common/fileapi/file_system_types.h" 18 #include "webkit/common/fileapi/file_system_types.h"
19 19
20 namespace content { 20 namespace content {
21 class QuotaReservationManagerTest; 21 class QuotaReservationManagerTest;
22 } 22 }
23 23
24 namespace storage { 24 namespace storage {
25 25
26 class QuotaReservation; 26 class QuotaReservation;
27 class QuotaReservationBuffer; 27 class QuotaReservationBuffer;
28 class OpenFileHandle; 28 class OpenFileHandle;
29 class OpenFileHandleContext; 29 class OpenFileHandleContext;
30 30
31 class WEBKIT_STORAGE_BROWSER_EXPORT QuotaReservationManager { 31 class STORAGE_EXPORT QuotaReservationManager {
32 public: 32 public:
33 // Callback for ReserveQuota. When this callback returns false, ReserveQuota 33 // Callback for ReserveQuota. When this callback returns false, ReserveQuota
34 // operation should be reverted. 34 // operation should be reverted.
35 typedef base::Callback<bool(base::File::Error error, int64 delta)> 35 typedef base::Callback<bool(base::File::Error error, int64 delta)>
36 ReserveQuotaCallback; 36 ReserveQuotaCallback;
37 37
38 // An abstraction of backing quota system. 38 // An abstraction of backing quota system.
39 class WEBKIT_STORAGE_BROWSER_EXPORT QuotaBackend { 39 class STORAGE_EXPORT QuotaBackend {
40 public: 40 public:
41 QuotaBackend() {} 41 QuotaBackend() {}
42 virtual ~QuotaBackend() {} 42 virtual ~QuotaBackend() {}
43 43
44 // Reserves or reclaims |delta| of quota for |origin| and |type| pair. 44 // Reserves or reclaims |delta| of quota for |origin| and |type| pair.
45 // Reserved quota should be counted as usage, but it should be on-memory 45 // Reserved quota should be counted as usage, but it should be on-memory
46 // and be cleared by a browser restart. 46 // and be cleared by a browser restart.
47 // Invokes |callback| upon completion with an error code. 47 // Invokes |callback| upon completion with an error code.
48 // |callback| should return false if it can't accept the reservation, in 48 // |callback| should return false if it can't accept the reservation, in
49 // that case, the backend should roll back the reservation. 49 // that case, the backend should roll back the reservation.
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 118
119 base::SequenceChecker sequence_checker_; 119 base::SequenceChecker sequence_checker_;
120 base::WeakPtrFactory<QuotaReservationManager> weak_ptr_factory_; 120 base::WeakPtrFactory<QuotaReservationManager> weak_ptr_factory_;
121 121
122 DISALLOW_COPY_AND_ASSIGN(QuotaReservationManager); 122 DISALLOW_COPY_AND_ASSIGN(QuotaReservationManager);
123 }; 123 };
124 124
125 } // namespace storage 125 } // namespace storage
126 126
127 #endif // WEBKIT_BROWSER_FILEAPI_QUOTA_QUOTA_RESERVATION_MANAGER_H_ 127 #endif // WEBKIT_BROWSER_FILEAPI_QUOTA_QUOTA_RESERVATION_MANAGER_H_
OLDNEW
« no previous file with comments | « webkit/browser/fileapi/quota/quota_reservation_buffer.h ('k') | webkit/browser/fileapi/recursive_operation_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698