OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #ifndef NET_TOOLS_FLIP_SERVER_OUTPUT_ORDERING_H_ | 5 #ifndef NET_TOOLS_FLIP_SERVER_OUTPUT_ORDERING_H_ |
6 #define NET_TOOLS_FLIP_SERVER_OUTPUT_ORDERING_H_ | 6 #define NET_TOOLS_FLIP_SERVER_OUTPUT_ORDERING_H_ |
7 | 7 |
8 #include <list> | 8 #include <list> |
9 #include <map> | 9 #include <map> |
10 #include <string> | 10 #include <string> |
11 | 11 |
12 #include "base/basictypes.h" | 12 #include "base/basictypes.h" |
13 #include "base/compiler_specific.h" | 13 #include "base/compiler_specific.h" |
14 #include "net/tools/epoll_server/epoll_server.h" | 14 #include "net/tools/epoll_server/epoll_server.h" |
15 #include "net/tools/flip_server/constants.h" | 15 #include "net/tools/flip_server/constants.h" |
16 #include "net/tools/flip_server/mem_cache.h" | 16 #include "net/tools/flip_server/mem_cache.h" |
17 | 17 |
18 namespace net { | 18 namespace net { |
19 | 19 |
20 class SMConnectionInterface; | 20 class SMConnectionInterface; |
21 | 21 |
22 class OutputOrdering { | 22 class OutputOrdering { |
23 public: | 23 public: |
24 typedef std::list<MemCacheIter> PriorityRing; | 24 typedef std::list<MemCacheIter> PriorityRing; |
25 typedef std::map<uint32, PriorityRing> PriorityMap; | 25 typedef std::map<uint32, PriorityRing> PriorityMap; |
26 | 26 |
27 struct PriorityMapPointer { | 27 struct PriorityMapPointer { |
28 PriorityMapPointer(); | 28 PriorityMapPointer(); |
| 29 ~PriorityMapPointer(); |
29 PriorityRing* ring; | 30 PriorityRing* ring; |
30 PriorityRing::iterator it; | 31 PriorityRing::iterator it; |
31 bool alarm_enabled; | 32 bool alarm_enabled; |
32 EpollServer::AlarmRegToken alarm_token; | 33 EpollServer::AlarmRegToken alarm_token; |
33 }; | 34 }; |
34 | 35 |
35 typedef std::map<uint32, PriorityMapPointer> StreamIdToPriorityMap; | 36 typedef std::map<uint32, PriorityMapPointer> StreamIdToPriorityMap; |
36 | 37 |
37 StreamIdToPriorityMap stream_ids_; | 38 StreamIdToPriorityMap stream_ids_; |
38 PriorityMap priority_map_; | 39 PriorityMap priority_map_; |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
79 server_think_time_in_s_ = value; | 80 server_think_time_in_s_ = value; |
80 } | 81 } |
81 | 82 |
82 private: | 83 private: |
83 static double server_think_time_in_s_; | 84 static double server_think_time_in_s_; |
84 }; | 85 }; |
85 | 86 |
86 } // namespace net | 87 } // namespace net |
87 | 88 |
88 #endif // NET_TOOLS_FLIP_SERVER_OUTPUT_ORDERING_H_ | 89 #endif // NET_TOOLS_FLIP_SERVER_OUTPUT_ORDERING_H_ |
OLD | NEW |