| 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 "net/spdy/spdy_protocol.h" | 5 #include "net/spdy/spdy_protocol.h" |
| 6 | 6 |
| 7 namespace net { | 7 namespace net { |
| 8 | 8 |
| 9 SpdyFrameWithNameValueBlockIR::SpdyFrameWithNameValueBlockIR( | 9 SpdyFrameWithNameValueBlockIR::SpdyFrameWithNameValueBlockIR( |
| 10 SpdyStreamId stream_id) : SpdyFrameWithFinIR(stream_id) {} | 10 SpdyStreamId stream_id) : SpdyFrameWithFinIR(stream_id) {} |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 79 return SETTINGS; | 79 return SETTINGS; |
| 80 case 6: | 80 case 6: |
| 81 return PING; | 81 return PING; |
| 82 case 7: | 82 case 7: |
| 83 return GOAWAY; | 83 return GOAWAY; |
| 84 case 8: | 84 case 8: |
| 85 return HEADERS; | 85 return HEADERS; |
| 86 case 9: | 86 case 9: |
| 87 return WINDOW_UPDATE; | 87 return WINDOW_UPDATE; |
| 88 } | 88 } |
| 89 break; |
| 89 case SPDY4: | 90 case SPDY4: |
| 90 switch (frame_type_field) { | 91 switch (frame_type_field) { |
| 91 case 0: | 92 case 0: |
| 92 return DATA; | 93 return DATA; |
| 93 case 1: | 94 case 1: |
| 94 return HEADERS; | 95 return HEADERS; |
| 95 // TODO(hkhalil): Add PRIORITY. | 96 // TODO(hkhalil): Add PRIORITY. |
| 96 case 3: | 97 case 3: |
| 97 return RST_STREAM; | 98 return RST_STREAM; |
| 98 case 4: | 99 case 4: |
| 99 return SETTINGS; | 100 return SETTINGS; |
| 100 case 5: | 101 case 5: |
| 101 return PUSH_PROMISE; | 102 return PUSH_PROMISE; |
| 102 case 6: | 103 case 6: |
| 103 return PING; | 104 return PING; |
| 104 case 7: | 105 case 7: |
| 105 return GOAWAY; | 106 return GOAWAY; |
| 106 case 8: | 107 case 8: |
| 107 return WINDOW_UPDATE; | 108 return WINDOW_UPDATE; |
| 108 case 9: | 109 case 9: |
| 109 return CONTINUATION; | 110 return CONTINUATION; |
| 110 case 10: | 111 case 10: |
| 111 return BLOCKED; | 112 return BLOCKED; |
| 112 } | 113 } |
| 114 break; |
| 113 } | 115 } |
| 114 | 116 |
| 115 LOG(DFATAL) << "Unhandled frame type " << frame_type_field; | 117 LOG(DFATAL) << "Unhandled frame type " << frame_type_field; |
| 116 return DATA; | 118 return DATA; |
| 117 } | 119 } |
| 118 | 120 |
| 119 int SpdyConstants::SerializeFrameType(SpdyMajorVersion version, | 121 int SpdyConstants::SerializeFrameType(SpdyMajorVersion version, |
| 120 SpdyFrameType frame_type) { | 122 SpdyFrameType frame_type) { |
| 121 switch (version) { | 123 switch (version) { |
| 122 case SPDY2: | 124 case SPDY2: |
| (...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 244 | 246 |
| 245 void SpdyPushPromiseIR::Visit(SpdyFrameVisitor* visitor) const { | 247 void SpdyPushPromiseIR::Visit(SpdyFrameVisitor* visitor) const { |
| 246 return visitor->VisitPushPromise(*this); | 248 return visitor->VisitPushPromise(*this); |
| 247 } | 249 } |
| 248 | 250 |
| 249 void SpdyContinuationIR::Visit(SpdyFrameVisitor* visitor) const { | 251 void SpdyContinuationIR::Visit(SpdyFrameVisitor* visitor) const { |
| 250 return visitor->VisitContinuation(*this); | 252 return visitor->VisitContinuation(*this); |
| 251 } | 253 } |
| 252 | 254 |
| 253 } // namespace net | 255 } // namespace net |
| OLD | NEW |