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_buffer.h" | 5 #include "webkit/browser/fileapi/quota/quota_reservation_buffer.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 "webkit/browser/fileapi/quota/open_file_handle.h" |
9 #include "webkit/browser/fileapi/quota/open_file_handle_context.h" | 9 #include "webkit/browser/fileapi/quota/open_file_handle_context.h" |
10 #include "webkit/browser/fileapi/quota/quota_reservation.h" | 10 #include "webkit/browser/fileapi/quota/quota_reservation.h" |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
85 reservation_manager_, origin_, type_)); | 85 reservation_manager_, origin_, type_)); |
86 } | 86 } |
87 reservation_manager_->ReleaseReservationBuffer(this); | 87 reservation_manager_->ReleaseReservationBuffer(this); |
88 } | 88 } |
89 | 89 |
90 // static | 90 // static |
91 bool QuotaReservationBuffer::DecrementDirtyCount( | 91 bool QuotaReservationBuffer::DecrementDirtyCount( |
92 base::WeakPtr<QuotaReservationManager> reservation_manager, | 92 base::WeakPtr<QuotaReservationManager> reservation_manager, |
93 const GURL& origin, | 93 const GURL& origin, |
94 FileSystemType type, | 94 FileSystemType type, |
95 base::PlatformFileError error) { | 95 base::File::Error error) { |
96 DCHECK(origin.is_valid()); | 96 DCHECK(origin.is_valid()); |
97 if (error == base::PLATFORM_FILE_OK && reservation_manager) { | 97 if (error == base::File::FILE_OK && reservation_manager) { |
98 reservation_manager->DecrementDirtyCount(origin, type); | 98 reservation_manager->DecrementDirtyCount(origin, type); |
99 return true; | 99 return true; |
100 } | 100 } |
101 return false; | 101 return false; |
102 } | 102 } |
103 | 103 |
104 | 104 |
105 } // namespace fileapi | 105 } // namespace fileapi |
OLD | NEW |