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 | |
6 // constantly adding and subtracting header sizes; this is ugly and error- | |
7 // prone. | |
8 | |
9 #include "net/spdy/spdy_framer.h" | 5 #include "net/spdy/spdy_framer.h" |
10 | 6 |
11 #include "base/lazy_instance.h" | 7 #include "base/lazy_instance.h" |
12 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
13 #include "base/metrics/stats_counters.h" | 9 #include "base/metrics/stats_counters.h" |
14 #include "base/strings/string_util.h" | 10 #include "base/strings/string_util.h" |
15 #include "base/third_party/valgrind/memcheck.h" | 11 #include "base/third_party/valgrind/memcheck.h" |
16 #include "net/spdy/spdy_frame_builder.h" | 12 #include "net/spdy/spdy_frame_builder.h" |
17 #include "net/spdy/spdy_frame_reader.h" | 13 #include "net/spdy/spdy_frame_reader.h" |
18 #include "net/spdy/spdy_bitmasks.h" | 14 #include "net/spdy/spdy_bitmasks.h" |
(...skipping 2971 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2990 builder->Seek(compressed_size); | 2986 builder->Seek(compressed_size); |
2991 builder->RewriteLength(*this); | 2987 builder->RewriteLength(*this); |
2992 | 2988 |
2993 pre_compress_bytes.Add(uncompressed_len); | 2989 pre_compress_bytes.Add(uncompressed_len); |
2994 post_compress_bytes.Add(compressed_size); | 2990 post_compress_bytes.Add(compressed_size); |
2995 | 2991 |
2996 compressed_frames.Increment(); | 2992 compressed_frames.Increment(); |
2997 } | 2993 } |
2998 | 2994 |
2999 } // namespace net | 2995 } // namespace net |
OLD | NEW |