OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 BLIMP_NET_BLIMP_MESSAGE_CHECKPOINTER_H_ | 5 #ifndef BLIMP_NET_BLIMP_MESSAGE_CHECKPOINTER_H_ |
6 #define BLIMP_NET_BLIMP_MESSAGE_CHECKPOINTER_H_ | 6 #define BLIMP_NET_BLIMP_MESSAGE_CHECKPOINTER_H_ |
7 | 7 |
| 8 #include <stdint.h> |
| 9 |
8 #include "base/macros.h" | 10 #include "base/macros.h" |
9 #include "base/timer/timer.h" | 11 #include "base/timer/timer.h" |
10 #include "blimp/net/blimp_message_processor.h" | 12 #include "blimp/net/blimp_message_processor.h" |
11 #include "blimp/net/blimp_net_export.h" | 13 #include "blimp/net/blimp_net_export.h" |
12 | 14 |
13 namespace blimp { | 15 namespace blimp { |
14 | 16 |
15 class BlimpMessage; | 17 class BlimpMessage; |
16 class BlimpMessageCheckpointObserver; | 18 class BlimpMessageCheckpointObserver; |
17 | 19 |
(...skipping 17 matching lines...) Expand all Loading... |
35 private: | 37 private: |
36 void InvokeCompletionCallback(const net::CompletionCallback& callback, | 38 void InvokeCompletionCallback(const net::CompletionCallback& callback, |
37 int result); | 39 int result); |
38 void SendCheckpointAck(); | 40 void SendCheckpointAck(); |
39 | 41 |
40 BlimpMessageProcessor* incoming_processor_; | 42 BlimpMessageProcessor* incoming_processor_; |
41 BlimpMessageProcessor* outgoing_processor_; | 43 BlimpMessageProcessor* outgoing_processor_; |
42 BlimpMessageCheckpointObserver* checkpoint_observer_; | 44 BlimpMessageCheckpointObserver* checkpoint_observer_; |
43 | 45 |
44 // Holds the Id of the message that most recently completed processing. | 46 // Holds the Id of the message that most recently completed processing. |
45 int64 checkpoint_id_ = 0; | 47 int64_t checkpoint_id_ = 0; |
46 | 48 |
47 // Used to batch multiple processed messages into a single ACK. | 49 // Used to batch multiple processed messages into a single ACK. |
48 base::OneShotTimer defer_timer_; | 50 base::OneShotTimer defer_timer_; |
49 | 51 |
50 // Used to abandon pending ProcessMessage completion callbacks on deletion. | 52 // Used to abandon pending ProcessMessage completion callbacks on deletion. |
51 base::WeakPtrFactory<BlimpMessageCheckpointer> weak_factory_; | 53 base::WeakPtrFactory<BlimpMessageCheckpointer> weak_factory_; |
52 | 54 |
53 DISALLOW_COPY_AND_ASSIGN(BlimpMessageCheckpointer); | 55 DISALLOW_COPY_AND_ASSIGN(BlimpMessageCheckpointer); |
54 }; | 56 }; |
55 | 57 |
56 } // namespace blimp | 58 } // namespace blimp |
57 | 59 |
58 #endif // BLIMP_NET_BLIMP_MESSAGE_CHECKPOINTER_H_ | 60 #endif // BLIMP_NET_BLIMP_MESSAGE_CHECKPOINTER_H_ |
OLD | NEW |