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_CURVECP_CLIENT_PACKETIZER_H_ | 5 #ifndef NET_CURVECP_CLIENT_PACKETIZER_H_ |
6 #define NET_CURVECP_CLIENT_PACKETIZER_H_ | 6 #define NET_CURVECP_CLIENT_PACKETIZER_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| 11 #include "base/memory/weak_ptr.h" |
11 #include "base/task.h" | 12 #include "base/task.h" |
12 #include "net/base/address_list.h" | 13 #include "net/base/address_list.h" |
13 #include "net/base/completion_callback.h" | 14 #include "net/base/completion_callback.h" |
14 #include "net/curvecp/packetizer.h" | 15 #include "net/curvecp/packetizer.h" |
15 #include "net/curvecp/protocol.h" | 16 #include "net/curvecp/protocol.h" |
16 | 17 |
17 namespace net { | 18 namespace net { |
18 | 19 |
19 class AddressList; | 20 class AddressList; |
20 class IOBuffer; | 21 class IOBuffer; |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
86 AddressList addresses_; | 87 AddressList addresses_; |
87 const struct addrinfo* current_address_; | 88 const struct addrinfo* current_address_; |
88 int hello_attempts_; // Number of attempts to send a Hello Packet. | 89 int hello_attempts_; // Number of attempts to send a Hello Packet. |
89 bool initiate_sent_; // Indicates whether the Initialte Packet was sent. | 90 bool initiate_sent_; // Indicates whether the Initialte Packet was sent. |
90 | 91 |
91 scoped_refptr<IOBuffer> read_buffer_; // Buffer for interal reads. | 92 scoped_refptr<IOBuffer> read_buffer_; // Buffer for interal reads. |
92 | 93 |
93 uchar shortterm_public_key_[32]; | 94 uchar shortterm_public_key_[32]; |
94 | 95 |
95 OldCompletionCallbackImpl<ClientPacketizer> io_callback_; | 96 OldCompletionCallbackImpl<ClientPacketizer> io_callback_; |
96 ScopedRunnableMethodFactory<ClientPacketizer> timers_factory_; | 97 base::WeakPtrFactory<ClientPacketizer> weak_factory_; |
97 | 98 |
98 DISALLOW_COPY_AND_ASSIGN(ClientPacketizer); | 99 DISALLOW_COPY_AND_ASSIGN(ClientPacketizer); |
99 }; | 100 }; |
100 | 101 |
101 } // namespace net | 102 } // namespace net |
102 | 103 |
103 #endif // NET_CURVECP_CLIENT_PACKETIZER_H_ | 104 #endif // NET_CURVECP_CLIENT_PACKETIZER_H_ |
OLD | NEW |