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 // TODO(rtenhove) clean up frame buffer size calculations so that we aren't | 5 // TODO(rtenhove) clean up frame buffer size calculations so that we aren't |
6 // constantly adding and subtracting header sizes; this is ugly and error- | 6 // constantly adding and subtracting header sizes; this is ugly and error- |
7 // prone. | 7 // prone. |
8 | 8 |
9 #include "net/spdy/spdy_framer.h" | 9 #include "net/spdy/spdy_framer.h" |
10 | 10 |
11 #include "base/lazy_instance.h" | 11 #include "base/lazy_instance.h" |
12 #include "base/memory/scoped_ptr.h" | 12 #include "base/memory/scoped_ptr.h" |
13 #include "base/metrics/stats_counters.h" | 13 #include "base/metrics/stats_counters.h" |
14 #include "base/third_party/valgrind/memcheck.h" | 14 #include "base/third_party/valgrind/memcheck.h" |
15 #include "net/spdy/spdy_frame_builder.h" | 15 #include "net/spdy/spdy_frame_builder.h" |
16 #include "net/spdy/spdy_frame_reader.h" | 16 #include "net/spdy/spdy_frame_reader.h" |
17 #include "net/spdy/spdy_bitmasks.h" | 17 #include "net/spdy/spdy_bitmasks.h" |
18 | |
19 #if defined(USE_SYSTEM_ZLIB) | |
20 #include <zlib.h> | |
21 #else | |
22 #include "third_party/zlib/zlib.h" | 18 #include "third_party/zlib/zlib.h" |
23 #endif | |
24 | 19 |
25 using std::vector; | 20 using std::vector; |
26 | 21 |
27 namespace net { | 22 namespace net { |
28 | 23 |
29 namespace { | 24 namespace { |
30 | 25 |
31 // Compute the id of our dictionary so that we know we're using the | 26 // Compute the id of our dictionary so that we know we're using the |
32 // right one when asked for it. | 27 // right one when asked for it. |
33 uLong CalculateDictionaryId(const char* dictionary, | 28 uLong CalculateDictionaryId(const char* dictionary, |
(...skipping 1838 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1872 } | 1867 } |
1873 } | 1868 } |
1874 return stream_id; | 1869 return stream_id; |
1875 } | 1870 } |
1876 | 1871 |
1877 void SpdyFramer::set_enable_compression(bool value) { | 1872 void SpdyFramer::set_enable_compression(bool value) { |
1878 enable_compression_ = value; | 1873 enable_compression_ = value; |
1879 } | 1874 } |
1880 | 1875 |
1881 } // namespace net | 1876 } // namespace net |
OLD | NEW |