| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 "net/spdy/spdy_buffer.h" | 5 #include "net/spdy/spdy_buffer.h" |
| 6 | 6 |
| 7 #include <cstring> | 7 #include <cstring> |
| 8 | 8 |
| 9 #include "base/callback.h" | 9 #include "base/callback.h" |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| 11 #include "base/macros.h" |
| 11 #include "net/base/io_buffer.h" | 12 #include "net/base/io_buffer.h" |
| 12 #include "net/spdy/spdy_protocol.h" | 13 #include "net/spdy/spdy_protocol.h" |
| 13 | 14 |
| 14 namespace net { | 15 namespace net { |
| 15 | 16 |
| 16 namespace { | 17 namespace { |
| 17 | 18 |
| 18 // Bound on largest frame any SPDY version has allowed. | 19 // Bound on largest frame any SPDY version has allowed. |
| 19 const size_t kMaxSpdyFrameSize = 0x00ffffff; | 20 const size_t kMaxSpdyFrameSize = 0x00ffffff; |
| 20 | 21 |
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 100 DCHECK_GE(consume_size, 1u); | 101 DCHECK_GE(consume_size, 1u); |
| 101 DCHECK_LE(consume_size, GetRemainingSize()); | 102 DCHECK_LE(consume_size, GetRemainingSize()); |
| 102 offset_ += consume_size; | 103 offset_ += consume_size; |
| 103 for (std::vector<ConsumeCallback>::const_iterator it = | 104 for (std::vector<ConsumeCallback>::const_iterator it = |
| 104 consume_callbacks_.begin(); it != consume_callbacks_.end(); ++it) { | 105 consume_callbacks_.begin(); it != consume_callbacks_.end(); ++it) { |
| 105 it->Run(consume_size, consume_source); | 106 it->Run(consume_size, consume_source); |
| 106 } | 107 } |
| 107 }; | 108 }; |
| 108 | 109 |
| 109 } // namespace net | 110 } // namespace net |
| OLD | NEW |