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 <cstddef> | 7 #include <cstddef> |
8 #include <cstring> | 8 #include <cstring> |
9 #include <string> | 9 #include <string> |
10 | 10 |
11 #include "base/basictypes.h" | |
12 #include "base/bind.h" | 11 #include "base/bind.h" |
13 #include "base/memory/ref_counted.h" | 12 #include "base/memory/ref_counted.h" |
14 #include "base/memory/scoped_ptr.h" | 13 #include "base/memory/scoped_ptr.h" |
15 #include "net/base/io_buffer.h" | 14 #include "net/base/io_buffer.h" |
16 #include "net/spdy/spdy_protocol.h" | 15 #include "net/spdy/spdy_protocol.h" |
17 #include "testing/gtest/include/gtest/gtest.h" | 16 #include "testing/gtest/include/gtest/gtest.h" |
18 | 17 |
19 namespace net { | 18 namespace net { |
20 | 19 |
21 namespace { | 20 namespace { |
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
128 buffer.reset(); | 127 buffer.reset(); |
129 | 128 |
130 // This will cause a use-after-free error if |io_buffer| doesn't | 129 // This will cause a use-after-free error if |io_buffer| doesn't |
131 // outlive |buffer|. | 130 // outlive |buffer|. |
132 std::memcpy(io_buffer->data(), kData, kDataSize); | 131 std::memcpy(io_buffer->data(), kData, kDataSize); |
133 } | 132 } |
134 | 133 |
135 } // namespace | 134 } // namespace |
136 | 135 |
137 } // namespace net | 136 } // namespace net |
OLD | NEW |