| 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 "content/renderer/p2p/ipc_network_manager.h" | 5 #include "content/renderer/p2p/ipc_network_manager.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
| 9 #include "base/sys_byteorder.h" | 9 #include "base/sys_byteorder.h" |
| 10 #include "content/public/common/content_switches.h" | 10 #include "content/public/common/content_switches.h" |
| (...skipping 12 matching lines...) Expand all Loading... |
| 23 return talk_base::ADAPTER_TYPE_ETHERNET; | 23 return talk_base::ADAPTER_TYPE_ETHERNET; |
| 24 case net::NetworkChangeNotifier::CONNECTION_WIFI: | 24 case net::NetworkChangeNotifier::CONNECTION_WIFI: |
| 25 return talk_base::ADAPTER_TYPE_WIFI; | 25 return talk_base::ADAPTER_TYPE_WIFI; |
| 26 case net::NetworkChangeNotifier::CONNECTION_2G: | 26 case net::NetworkChangeNotifier::CONNECTION_2G: |
| 27 case net::NetworkChangeNotifier::CONNECTION_3G: | 27 case net::NetworkChangeNotifier::CONNECTION_3G: |
| 28 case net::NetworkChangeNotifier::CONNECTION_4G: | 28 case net::NetworkChangeNotifier::CONNECTION_4G: |
| 29 return talk_base::ADAPTER_TYPE_CELLULAR; | 29 return talk_base::ADAPTER_TYPE_CELLULAR; |
| 30 default: | 30 default: |
| 31 return talk_base::ADAPTER_TYPE_UNKNOWN; | 31 return talk_base::ADAPTER_TYPE_UNKNOWN; |
| 32 } | 32 } |
| 33 return talk_base::ADAPTER_TYPE_UNKNOWN; | |
| 34 } | 33 } |
| 35 | 34 |
| 36 } // namespace | 35 } // namespace |
| 37 | 36 |
| 38 IpcNetworkManager::IpcNetworkManager(P2PSocketDispatcher* socket_dispatcher) | 37 IpcNetworkManager::IpcNetworkManager(P2PSocketDispatcher* socket_dispatcher) |
| 39 : socket_dispatcher_(socket_dispatcher), | 38 : socket_dispatcher_(socket_dispatcher), |
| 40 start_count_(0), | 39 start_count_(0), |
| 41 network_list_received_(false), | 40 network_list_received_(false), |
| 42 weak_factory_(this) { | 41 weak_factory_(this) { |
| 43 socket_dispatcher_->AddNetworkListObserver(this); | 42 socket_dispatcher_->AddNetworkListObserver(this); |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 122 MergeNetworkList(networks, &changed); | 121 MergeNetworkList(networks, &changed); |
| 123 if (changed) | 122 if (changed) |
| 124 SignalNetworksChanged(); | 123 SignalNetworksChanged(); |
| 125 } | 124 } |
| 126 | 125 |
| 127 void IpcNetworkManager::SendNetworksChangedSignal() { | 126 void IpcNetworkManager::SendNetworksChangedSignal() { |
| 128 SignalNetworksChanged(); | 127 SignalNetworksChanged(); |
| 129 } | 128 } |
| 130 | 129 |
| 131 } // namespace content | 130 } // namespace content |
| OLD | NEW |