OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/http/http_network_transaction.h" | 5 #include "net/http/http_network_transaction.h" |
6 | 6 |
7 #include <set> | 7 #include <set> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
(...skipping 1815 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1826 STATE_CASE(STATE_SPDY_READ_BODY); | 1826 STATE_CASE(STATE_SPDY_READ_BODY); |
1827 STATE_CASE(STATE_SPDY_READ_BODY_COMPLETE); | 1827 STATE_CASE(STATE_SPDY_READ_BODY_COMPLETE); |
1828 STATE_CASE(STATE_NONE); | 1828 STATE_CASE(STATE_NONE); |
1829 default: | 1829 default: |
1830 description = StringPrintf("Unknown state 0x%08X (%u)", state, state); | 1830 description = StringPrintf("Unknown state 0x%08X (%u)", state, state); |
1831 break; | 1831 break; |
1832 } | 1832 } |
1833 return description; | 1833 return description; |
1834 } | 1834 } |
1835 | 1835 |
| 1836 // TODO(gavinp): re-adjust this once SPDY v3 has three priority bits, |
| 1837 // eliminating the need for this folding. |
| 1838 int ConvertRequestPriorityToSpdyPriority(const RequestPriority priority) { |
| 1839 DCHECK(HIGHEST <= priority && priority < NUM_PRIORITIES); |
| 1840 switch (priority) { |
| 1841 case LOWEST: |
| 1842 return SPDY_PRIORITY_LOWEST-1; |
| 1843 case IDLE: |
| 1844 return SPDY_PRIORITY_LOWEST; |
| 1845 default: |
| 1846 return priority; |
| 1847 } |
| 1848 } |
| 1849 |
| 1850 |
| 1851 |
1836 #undef STATE_CASE | 1852 #undef STATE_CASE |
1837 | 1853 |
1838 } // namespace net | 1854 } // namespace net |
OLD | NEW |