OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "content/browser/renderer_host/resource_buffer.h" | 5 #include "content/browser/loader/resource_buffer.h" |
6 | 6 |
7 #include <math.h> | 7 #include <math.h> |
8 | 8 |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 | 10 |
11 namespace content { | 11 namespace content { |
12 | 12 |
13 // A circular buffer allocator. | 13 // A circular buffer allocator. |
14 // | 14 // |
15 // We keep track of the starting offset (alloc_start_) and the ending offset | 15 // We keep track of the starting offset (alloc_start_) and the ending offset |
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
172 DCHECK(alloc_sizes_.empty()); | 172 DCHECK(alloc_sizes_.empty()); |
173 alloc_start_ = -1; | 173 alloc_start_ = -1; |
174 alloc_end_ = -1; | 174 alloc_end_ = -1; |
175 } else if (alloc_start_ == buf_size_) { | 175 } else if (alloc_start_ == buf_size_) { |
176 DCHECK(!alloc_sizes_.empty()); | 176 DCHECK(!alloc_sizes_.empty()); |
177 alloc_start_ = 0; | 177 alloc_start_ = 0; |
178 } | 178 } |
179 } | 179 } |
180 | 180 |
181 } // namespace content | 181 } // namespace content |
OLD | NEW |