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 #include "webkit/browser/fileapi/quota/quota_reservation.h" | 5 #include "storage/browser/fileapi/quota/quota_reservation.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "webkit/browser/fileapi/quota/open_file_handle.h" | 8 #include "storage/browser/fileapi/quota/open_file_handle.h" |
9 #include "webkit/browser/fileapi/quota/quota_reservation_buffer.h" | 9 #include "storage/browser/fileapi/quota/quota_reservation_buffer.h" |
10 | 10 |
11 namespace storage { | 11 namespace storage { |
12 | 12 |
13 void QuotaReservation::RefreshReservation( | 13 void QuotaReservation::RefreshReservation( |
14 int64 size, | 14 int64 size, |
15 const StatusCallback& callback) { | 15 const StatusCallback& callback) { |
16 DCHECK(sequence_checker_.CalledOnValidSequencedThread()); | 16 DCHECK(sequence_checker_.CalledOnValidSequencedThread()); |
17 DCHECK(!running_refresh_request_); | 17 DCHECK(!running_refresh_request_); |
18 DCHECK(!client_crashed_); | 18 DCHECK(!client_crashed_); |
19 if (!reservation_manager()) | 19 if (!reservation_manager()) |
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
118 return false; | 118 return false; |
119 } | 119 } |
120 | 120 |
121 if (error == base::File::FILE_OK) | 121 if (error == base::File::FILE_OK) |
122 remaining_quota_ = previous_size + delta; | 122 remaining_quota_ = previous_size + delta; |
123 callback.Run(error); | 123 callback.Run(error); |
124 return true; | 124 return true; |
125 } | 125 } |
126 | 126 |
127 } // namespace storage | 127 } // namespace storage |
OLD | NEW |