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_H_ | 5 #ifndef WEBKIT_BROWSER_FILEAPI_QUOTA_QUOTA_RESERVATION_H_ |
6 #define WEBKIT_BROWSER_FILEAPI_QUOTA_QUOTA_RESERVATION_H_ | 6 #define WEBKIT_BROWSER_FILEAPI_QUOTA_QUOTA_RESERVATION_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/files/file_path.h" | 9 #include "base/files/file_path.h" |
10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
62 explicit QuotaReservation(QuotaReservationBuffer* reservation_buffer); | 62 explicit QuotaReservation(QuotaReservationBuffer* reservation_buffer); |
63 | 63 |
64 friend class base::RefCounted<QuotaReservation>; | 64 friend class base::RefCounted<QuotaReservation>; |
65 virtual ~QuotaReservation(); | 65 virtual ~QuotaReservation(); |
66 | 66 |
67 static bool AdaptDidUpdateReservedQuota( | 67 static bool AdaptDidUpdateReservedQuota( |
68 const base::WeakPtr<QuotaReservation>& reservation, | 68 const base::WeakPtr<QuotaReservation>& reservation, |
69 int64 new_reserved_size, | 69 int64 new_reserved_size, |
70 const StatusCallback& callback, | 70 const StatusCallback& callback, |
71 base::PlatformFileError error); | 71 base::PlatformFileError error); |
72 void DidUpdateReservedQuota(int64 new_reserved_size, | 72 bool DidUpdateReservedQuota(int64 new_reserved_size, |
73 const StatusCallback& callback, | 73 const StatusCallback& callback, |
74 base::PlatformFileError error); | 74 base::PlatformFileError error); |
75 | 75 |
| 76 bool client_crashed_; |
76 bool running_refresh_request_; | 77 bool running_refresh_request_; |
77 int64 remaining_quota_; | 78 int64 remaining_quota_; |
78 | 79 |
79 scoped_refptr<QuotaReservationBuffer> reservation_buffer_; | 80 scoped_refptr<QuotaReservationBuffer> reservation_buffer_; |
80 | 81 |
81 base::SequenceChecker sequence_checker_; | 82 base::SequenceChecker sequence_checker_; |
82 base::WeakPtrFactory<QuotaReservation> weak_ptr_factory_; | 83 base::WeakPtrFactory<QuotaReservation> weak_ptr_factory_; |
83 | 84 |
84 DISALLOW_COPY_AND_ASSIGN(QuotaReservation); | 85 DISALLOW_COPY_AND_ASSIGN(QuotaReservation); |
85 }; | 86 }; |
86 | 87 |
87 } // namespace fileapi | 88 } // namespace fileapi |
88 | 89 |
89 #endif // WEBKIT_BROWSER_FILEAPI_QUOTA_QUOTA_RESERVATION_H_ | 90 #endif // WEBKIT_BROWSER_FILEAPI_QUOTA_QUOTA_RESERVATION_H_ |
OLD | NEW |