| 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 WEBKIT_BROWSER_FILEAPI_QUOTA_QUOTA_RESERVATION_BUFFER_H_ | 5 #ifndef WEBKIT_BROWSER_FILEAPI_QUOTA_QUOTA_RESERVATION_BUFFER_H_ |
| 6 #define WEBKIT_BROWSER_FILEAPI_QUOTA_QUOTA_RESERVATION_BUFFER_H_ | 6 #define WEBKIT_BROWSER_FILEAPI_QUOTA_QUOTA_RESERVATION_BUFFER_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| 11 #include "base/files/file.h" | 11 #include "base/files/file.h" |
| 12 #include "base/files/file_path.h" | 12 #include "base/files/file_path.h" |
| 13 #include "base/memory/ref_counted.h" | 13 #include "base/memory/ref_counted.h" |
| 14 #include "base/memory/weak_ptr.h" | 14 #include "base/memory/weak_ptr.h" |
| 15 #include "url/gurl.h" | 15 #include "url/gurl.h" |
| 16 #include "webkit/browser/webkit_storage_browser_export.h" | 16 #include "storage/common/storage_export.h" |
| 17 #include "webkit/common/fileapi/file_system_types.h" | 17 #include "storage/common/fileapi/file_system_types.h" |
| 18 | 18 |
| 19 namespace fileapi { | 19 namespace storage { |
| 20 | 20 |
| 21 class QuotaReservation; | 21 class QuotaReservation; |
| 22 class OpenFileHandle; | 22 class OpenFileHandle; |
| 23 class OpenFileHandleContext; | 23 class OpenFileHandleContext; |
| 24 class QuotaReservationManager; | 24 class QuotaReservationManager; |
| 25 | 25 |
| 26 // QuotaReservationBuffer manages QuotaReservation instances. All consumed | 26 // QuotaReservationBuffer manages QuotaReservation instances. All consumed |
| 27 // quota and leaked quota by associated QuotaReservation will be staged in | 27 // quota and leaked quota by associated QuotaReservation will be staged in |
| 28 // QuotaReservationBuffer, and will be committed on a modified file is closed. | 28 // QuotaReservationBuffer, and will be committed on a modified file is closed. |
| 29 // The instance keeps alive while any associated QuotaReservation or | 29 // The instance keeps alive while any associated QuotaReservation or |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 66 typedef std::map<base::FilePath, OpenFileHandleContext*> | 66 typedef std::map<base::FilePath, OpenFileHandleContext*> |
| 67 OpenFileHandleContextByPath; | 67 OpenFileHandleContextByPath; |
| 68 | 68 |
| 69 // Not owned. The destructor of OpenFileHandler should erase itself from | 69 // Not owned. The destructor of OpenFileHandler should erase itself from |
| 70 // |open_files_|. | 70 // |open_files_|. |
| 71 OpenFileHandleContextByPath open_files_; | 71 OpenFileHandleContextByPath open_files_; |
| 72 | 72 |
| 73 base::WeakPtr<QuotaReservationManager> reservation_manager_; | 73 base::WeakPtr<QuotaReservationManager> reservation_manager_; |
| 74 | 74 |
| 75 GURL origin_; | 75 GURL origin_; |
| 76 fileapi::FileSystemType type_; | 76 storage::FileSystemType type_; |
| 77 | 77 |
| 78 int64 reserved_quota_; | 78 int64 reserved_quota_; |
| 79 | 79 |
| 80 base::SequenceChecker sequence_checker_; | 80 base::SequenceChecker sequence_checker_; |
| 81 | 81 |
| 82 DISALLOW_COPY_AND_ASSIGN(QuotaReservationBuffer); | 82 DISALLOW_COPY_AND_ASSIGN(QuotaReservationBuffer); |
| 83 }; | 83 }; |
| 84 | 84 |
| 85 } // namespace fileapi | 85 } // namespace storage |
| 86 | 86 |
| 87 #endif // WEBKIT_BROWSER_FILEAPI_QUOTA_QUOTA_RESERVATION_BUFFER_H_ | 87 #endif // WEBKIT_BROWSER_FILEAPI_QUOTA_QUOTA_RESERVATION_BUFFER_H_ |
| OLD | NEW |