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

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

Issue 145303002: Convert Media Galleries to use base::File (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 6 years, 10 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 | 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 #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/memory/ref_counted.h" 14 #include "base/memory/ref_counted.h"
14 #include "base/memory/weak_ptr.h" 15 #include "base/memory/weak_ptr.h"
15 #include "base/platform_file.h"
16 #include "url/gurl.h" 16 #include "url/gurl.h"
17 #include "webkit/browser/webkit_storage_browser_export.h" 17 #include "webkit/browser/webkit_storage_browser_export.h"
18 #include "webkit/common/fileapi/file_system_types.h" 18 #include "webkit/common/fileapi/file_system_types.h"
19 19
20 namespace fileapi { 20 namespace fileapi {
21 21
22 class QuotaReservation; 22 class QuotaReservation;
23 class QuotaReservationBuffer; 23 class QuotaReservationBuffer;
24 class OpenFileHandle; 24 class OpenFileHandle;
25 class OpenFileHandleContext; 25 class OpenFileHandleContext;
26 26
27 class WEBKIT_STORAGE_BROWSER_EXPORT QuotaReservationManager { 27 class WEBKIT_STORAGE_BROWSER_EXPORT QuotaReservationManager {
28 public: 28 public:
29 // Callback for ReserveQuota. When this callback returns false, ReserveQuota 29 // Callback for ReserveQuota. When this callback returns false, ReserveQuota
30 // operation should be reverted. 30 // operation should be reverted.
31 typedef base::Callback<bool(base::PlatformFileError error)> 31 typedef base::Callback<bool(base::File::Error error)>
32 ReserveQuotaCallback; 32 ReserveQuotaCallback;
33 33
34 // An abstraction of backing quota system. 34 // An abstraction of backing quota system.
35 class WEBKIT_STORAGE_BROWSER_EXPORT QuotaBackend { 35 class WEBKIT_STORAGE_BROWSER_EXPORT QuotaBackend {
36 public: 36 public:
37 QuotaBackend() {} 37 QuotaBackend() {}
38 virtual ~QuotaBackend() {} 38 virtual ~QuotaBackend() {}
39 39
40 // Reserves or reclaims |delta| of quota for |origin| and |type| pair. 40 // Reserves or reclaims |delta| of quota for |origin| and |type| pair.
41 // Reserved quota should be counted as usage, but it should be on-memory 41 // Reserved quota should be counted as usage, but it should be on-memory
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 114
115 base::SequenceChecker sequence_checker_; 115 base::SequenceChecker sequence_checker_;
116 base::WeakPtrFactory<QuotaReservationManager> weak_ptr_factory_; 116 base::WeakPtrFactory<QuotaReservationManager> weak_ptr_factory_;
117 117
118 DISALLOW_COPY_AND_ASSIGN(QuotaReservationManager); 118 DISALLOW_COPY_AND_ASSIGN(QuotaReservationManager);
119 }; 119 };
120 120
121 } // namespace fileapi 121 } // namespace fileapi
122 122
123 #endif // WEBKIT_BROWSER_FILEAPI_QUOTA_QUOTA_RESERVATION_MANAGER_H_ 123 #endif // WEBKIT_BROWSER_FILEAPI_QUOTA_QUOTA_RESERVATION_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698