OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 CHROME_BROWSER_EXTENSIONS_API_DIAL_DIAL_SERVICE_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_API_DIAL_DIAL_SERVICE_H_ |
6 #define CHROME_BROWSER_EXTENSIONS_API_DIAL_DIAL_SERVICE_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_API_DIAL_DIAL_SERVICE_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
| 9 #include <vector> |
9 | 10 |
10 #include "base/gtest_prod_util.h" | 11 #include "base/gtest_prod_util.h" |
11 #include "base/memory/scoped_ptr.h" | 12 #include "base/memory/scoped_ptr.h" |
12 #include "base/memory/scoped_vector.h" | |
13 #include "base/memory/weak_ptr.h" | 13 #include "base/memory/weak_ptr.h" |
14 #include "base/observer_list.h" | 14 #include "base/observer_list.h" |
15 #include "base/threading/thread_checker.h" | 15 #include "base/threading/thread_checker.h" |
16 #include "base/timer/timer.h" | 16 #include "base/timer/timer.h" |
17 #include "net/log/net_log.h" | 17 #include "net/log/net_log.h" |
18 #include "net/udp/udp_socket.h" | 18 #include "net/udp/udp_socket.h" |
19 | 19 |
20 namespace net { | 20 namespace net { |
21 class IPEndPoint; | 21 class IPEndPoint; |
22 class IPAddress; | 22 class IPAddress; |
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
237 | 237 |
238 // Called from finish_timer_ when we are done with the current round of | 238 // Called from finish_timer_ when we are done with the current round of |
239 // discovery. | 239 // discovery. |
240 void FinishDiscovery(); | 240 void FinishDiscovery(); |
241 | 241 |
242 // Returns |true| if there are open sockets. | 242 // Returns |true| if there are open sockets. |
243 bool HasOpenSockets(); | 243 bool HasOpenSockets(); |
244 | 244 |
245 // DialSockets for each network interface whose ip address was | 245 // DialSockets for each network interface whose ip address was |
246 // successfully bound. | 246 // successfully bound. |
247 ScopedVector<DialSocket> dial_sockets_; | 247 std::vector<scoped_ptr<DialSocket>> dial_sockets_; |
248 | 248 |
249 // The NetLog for this service. | 249 // The NetLog for this service. |
250 net::NetLog* net_log_; | 250 net::NetLog* net_log_; |
251 | 251 |
252 // The NetLog source for this service. | 252 // The NetLog source for this service. |
253 net::NetLog::Source net_log_source_; | 253 net::NetLog::Source net_log_source_; |
254 | 254 |
255 // The multicast address:port for search requests. | 255 // The multicast address:port for search requests. |
256 net::IPEndPoint send_address_; | 256 net::IPEndPoint send_address_; |
257 | 257 |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
294 FRIEND_TEST_ALL_PREFIXES(DialServiceTest, TestOnDeviceDiscovered); | 294 FRIEND_TEST_ALL_PREFIXES(DialServiceTest, TestOnDeviceDiscovered); |
295 FRIEND_TEST_ALL_PREFIXES(DialServiceTest, TestOnDiscoveryFinished); | 295 FRIEND_TEST_ALL_PREFIXES(DialServiceTest, TestOnDiscoveryFinished); |
296 FRIEND_TEST_ALL_PREFIXES(DialServiceTest, TestOnDiscoveryRequest); | 296 FRIEND_TEST_ALL_PREFIXES(DialServiceTest, TestOnDiscoveryRequest); |
297 FRIEND_TEST_ALL_PREFIXES(DialServiceTest, TestResponseParsing); | 297 FRIEND_TEST_ALL_PREFIXES(DialServiceTest, TestResponseParsing); |
298 DISALLOW_COPY_AND_ASSIGN(DialServiceImpl); | 298 DISALLOW_COPY_AND_ASSIGN(DialServiceImpl); |
299 }; | 299 }; |
300 | 300 |
301 } // namespace extensions | 301 } // namespace extensions |
302 | 302 |
303 #endif // CHROME_BROWSER_EXTENSIONS_API_DIAL_DIAL_SERVICE_H_ | 303 #endif // CHROME_BROWSER_EXTENSIONS_API_DIAL_DIAL_SERVICE_H_ |
OLD | NEW |