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 #include "chrome/browser/extensions/api/dial/dial_service.h" | 5 #include "chrome/browser/extensions/api/dial/dial_service.h" |
6 | 6 |
7 #include <stdint.h> | 7 #include <stdint.h> |
8 | 8 |
9 #include <algorithm> | 9 #include <algorithm> |
10 #include <set> | 10 #include <set> |
11 #include <utility> | 11 #include <utility> |
12 | 12 |
13 #include "base/callback.h" | 13 #include "base/callback.h" |
14 #include "base/location.h" | 14 #include "base/location.h" |
15 #include "base/logging.h" | 15 #include "base/logging.h" |
16 #include "base/rand_util.h" | 16 #include "base/rand_util.h" |
17 #include "base/single_thread_task_runner.h" | 17 #include "base/single_thread_task_runner.h" |
18 #include "base/strings/string_number_conversions.h" | 18 #include "base/strings/string_number_conversions.h" |
19 #include "base/strings/stringprintf.h" | 19 #include "base/strings/stringprintf.h" |
20 #include "base/thread_task_runner_handle.h" | 20 #include "base/threading/thread_task_runner_handle.h" |
21 #include "base/time/time.h" | 21 #include "base/time/time.h" |
22 #include "build/build_config.h" | 22 #include "build/build_config.h" |
23 #include "chrome/browser/extensions/api/dial/dial_device_data.h" | 23 #include "chrome/browser/extensions/api/dial/dial_device_data.h" |
24 #include "components/version_info/version_info.h" | 24 #include "components/version_info/version_info.h" |
25 #include "content/public/browser/browser_thread.h" | 25 #include "content/public/browser/browser_thread.h" |
26 #include "net/base/address_family.h" | 26 #include "net/base/address_family.h" |
27 #include "net/base/completion_callback.h" | 27 #include "net/base/completion_callback.h" |
28 #include "net/base/io_buffer.h" | 28 #include "net/base/io_buffer.h" |
29 #include "net/base/ip_endpoint.h" | 29 #include "net/base/ip_endpoint.h" |
30 #include "net/base/net_errors.h" | 30 #include "net/base/net_errors.h" |
(...skipping 584 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
615 | 615 |
616 bool DialServiceImpl::HasOpenSockets() { | 616 bool DialServiceImpl::HasOpenSockets() { |
617 for (const auto& socket : dial_sockets_) { | 617 for (const auto& socket : dial_sockets_) { |
618 if (!socket->IsClosed()) | 618 if (!socket->IsClosed()) |
619 return true; | 619 return true; |
620 } | 620 } |
621 return false; | 621 return false; |
622 } | 622 } |
623 | 623 |
624 } // namespace extensions | 624 } // namespace extensions |
OLD | NEW |