| 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> |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 49 bool ExistsInPriorityMaps(uint32 stream_id) const; | 49 bool ExistsInPriorityMaps(uint32 stream_id) const; |
| 50 | 50 |
| 51 struct BeginOutputtingAlarm : public EpollAlarmCallbackInterface { | 51 struct BeginOutputtingAlarm : public EpollAlarmCallbackInterface { |
| 52 public: | 52 public: |
| 53 BeginOutputtingAlarm(OutputOrdering* oo, | 53 BeginOutputtingAlarm(OutputOrdering* oo, |
| 54 OutputOrdering::PriorityMapPointer* pmp, | 54 OutputOrdering::PriorityMapPointer* pmp, |
| 55 const MemCacheIter& mci); | 55 const MemCacheIter& mci); |
| 56 virtual ~BeginOutputtingAlarm(); | 56 virtual ~BeginOutputtingAlarm(); |
| 57 | 57 |
| 58 // EpollAlarmCallbackInterface: | 58 // EpollAlarmCallbackInterface: |
| 59 virtual int64 OnAlarm() OVERRIDE; | 59 virtual int64 OnAlarm() override; |
| 60 virtual void OnRegistration(const EpollServer::AlarmRegToken& tok, | 60 virtual void OnRegistration(const EpollServer::AlarmRegToken& tok, |
| 61 EpollServer* eps) OVERRIDE; | 61 EpollServer* eps) override; |
| 62 virtual void OnUnregistration() OVERRIDE; | 62 virtual void OnUnregistration() override; |
| 63 virtual void OnShutdown(EpollServer* eps) OVERRIDE; | 63 virtual void OnShutdown(EpollServer* eps) override; |
| 64 | 64 |
| 65 private: | 65 private: |
| 66 OutputOrdering* output_ordering_; | 66 OutputOrdering* output_ordering_; |
| 67 OutputOrdering::PriorityMapPointer* pmp_; | 67 OutputOrdering::PriorityMapPointer* pmp_; |
| 68 MemCacheIter mci_; | 68 MemCacheIter mci_; |
| 69 EpollServer* epoll_server_; | 69 EpollServer* epoll_server_; |
| 70 }; | 70 }; |
| 71 | 71 |
| 72 void MoveToActive(PriorityMapPointer* pmp, MemCacheIter mci); | 72 void MoveToActive(PriorityMapPointer* pmp, MemCacheIter mci); |
| 73 void AddToOutputOrder(const MemCacheIter& mci); | 73 void AddToOutputOrder(const MemCacheIter& mci); |
| 74 void SpliceToPriorityRing(PriorityRing::iterator pri); | 74 void SpliceToPriorityRing(PriorityRing::iterator pri); |
| 75 MemCacheIter* GetIter(); | 75 MemCacheIter* GetIter(); |
| 76 void RemoveStreamId(uint32 stream_id); | 76 void RemoveStreamId(uint32 stream_id); |
| 77 | 77 |
| 78 static double server_think_time_in_s() { return server_think_time_in_s_; } | 78 static double server_think_time_in_s() { return server_think_time_in_s_; } |
| 79 static void set_server_think_time_in_s(double value) { | 79 static void set_server_think_time_in_s(double value) { |
| 80 server_think_time_in_s_ = value; | 80 server_think_time_in_s_ = value; |
| 81 } | 81 } |
| 82 | 82 |
| 83 private: | 83 private: |
| 84 static double server_think_time_in_s_; | 84 static double server_think_time_in_s_; |
| 85 }; | 85 }; |
| 86 | 86 |
| 87 } // namespace net | 87 } // namespace net |
| 88 | 88 |
| 89 #endif // NET_TOOLS_FLIP_SERVER_OUTPUT_ORDERING_H_ | 89 #endif // NET_TOOLS_FLIP_SERVER_OUTPUT_ORDERING_H_ |
| OLD | NEW |