OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_DNS_MOCK_MDNS_SOCKET_FACTORY_H_ | 5 #ifndef NET_DNS_MOCK_MDNS_SOCKET_FACTORY_H_ |
6 #define NET_DNS_MOCK_MDNS_SOCKET_FACTORY_H_ | 6 #define NET_DNS_MOCK_MDNS_SOCKET_FACTORY_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "net/dns/mdns_client_impl.h" | 10 #include "net/dns/mdns_client_impl.h" |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
47 | 47 |
48 MOCK_CONST_METHOD1(JoinGroup, int(const IPAddressNumber& group_address)); | 48 MOCK_CONST_METHOD1(JoinGroup, int(const IPAddressNumber& group_address)); |
49 MOCK_CONST_METHOD1(LeaveGroup, int(const IPAddressNumber& address)); | 49 MOCK_CONST_METHOD1(LeaveGroup, int(const IPAddressNumber& address)); |
50 | 50 |
51 MOCK_METHOD1(SetMulticastInterface, int(uint32 interface_index)); | 51 MOCK_METHOD1(SetMulticastInterface, int(uint32 interface_index)); |
52 MOCK_METHOD1(SetMulticastTimeToLive, int(int ttl)); | 52 MOCK_METHOD1(SetMulticastTimeToLive, int(int ttl)); |
53 MOCK_METHOD1(SetMulticastLoopbackMode, int(bool loopback)); | 53 MOCK_METHOD1(SetMulticastLoopbackMode, int(bool loopback)); |
54 | 54 |
55 MOCK_METHOD1(SetDiffServCodePoint, int(DiffServCodePoint dscp)); | 55 MOCK_METHOD1(SetDiffServCodePoint, int(DiffServCodePoint dscp)); |
56 | 56 |
| 57 MOCK_METHOD0(DetachFromThread, void()); |
| 58 |
57 void SetResponsePacket(std::string response_packet); | 59 void SetResponsePacket(std::string response_packet); |
58 | 60 |
59 int HandleRecvNow(IOBuffer* buffer, int size, IPEndPoint* address, | 61 int HandleRecvNow(IOBuffer* buffer, int size, IPEndPoint* address, |
60 const CompletionCallback& callback); | 62 const CompletionCallback& callback); |
61 | 63 |
62 int HandleRecvLater(IOBuffer* buffer, int size, IPEndPoint* address, | 64 int HandleRecvLater(IOBuffer* buffer, int size, IPEndPoint* address, |
63 const CompletionCallback& callback); | 65 const CompletionCallback& callback); |
64 | 66 |
65 private: | 67 private: |
66 std::string response_packet_; | 68 std::string response_packet_; |
(...skipping 26 matching lines...) Expand all Loading... |
93 ScopedVector<DatagramServerSocket>* sockets); | 95 ScopedVector<DatagramServerSocket>* sockets); |
94 | 96 |
95 scoped_refptr<IOBuffer> recv_buffer_; | 97 scoped_refptr<IOBuffer> recv_buffer_; |
96 int recv_buffer_size_; | 98 int recv_buffer_size_; |
97 CompletionCallback recv_callback_; | 99 CompletionCallback recv_callback_; |
98 }; | 100 }; |
99 | 101 |
100 } // namespace net | 102 } // namespace net |
101 | 103 |
102 #endif // NET_DNS_MOCK_MDNS_SOCKET_FACTORY_H_ | 104 #endif // NET_DNS_MOCK_MDNS_SOCKET_FACTORY_H_ |
OLD | NEW |