| 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 #include "content/renderer/p2p/ipc_network_manager.h" | 5 #include "content/renderer/p2p/ipc_network_manager.h" |
| 6 | 6 |
| 7 #include "net/base/net_util.h" | 7 #include "net/base/net_util.h" |
| 8 #include "net/base/sys_byteorder.h" | 8 #include "net/base/sys_byteorder.h" |
| 9 | 9 |
| 10 namespace content { |
| 11 |
| 10 IpcNetworkManager::IpcNetworkManager(P2PSocketDispatcher* socket_dispatcher) | 12 IpcNetworkManager::IpcNetworkManager(P2PSocketDispatcher* socket_dispatcher) |
| 11 : socket_dispatcher_(socket_dispatcher), | 13 : socket_dispatcher_(socket_dispatcher), |
| 12 started_(false), | 14 started_(false), |
| 13 first_update_sent_(false), | 15 first_update_sent_(false), |
| 14 ALLOW_THIS_IN_INITIALIZER_LIST(task_factory_(this)) { | 16 ALLOW_THIS_IN_INITIALIZER_LIST(task_factory_(this)) { |
| 15 } | 17 } |
| 16 | 18 |
| 17 IpcNetworkManager::~IpcNetworkManager() { | 19 IpcNetworkManager::~IpcNetworkManager() { |
| 18 socket_dispatcher_->RemoveNetworkListObserver(this); | 20 socket_dispatcher_->RemoveNetworkListObserver(this); |
| 19 } | 21 } |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 53 new talk_base::Network(it->name, it->name, address, 0)); | 55 new talk_base::Network(it->name, it->name, address, 0)); |
| 54 } | 56 } |
| 55 | 57 |
| 56 MergeNetworkList(networks, !first_update_sent_); | 58 MergeNetworkList(networks, !first_update_sent_); |
| 57 first_update_sent_ = false; | 59 first_update_sent_ = false; |
| 58 } | 60 } |
| 59 | 61 |
| 60 void IpcNetworkManager::SendNetworksChangedSignal() { | 62 void IpcNetworkManager::SendNetworksChangedSignal() { |
| 61 SignalNetworksChanged(); | 63 SignalNetworksChanged(); |
| 62 } | 64 } |
| 65 |
| 66 } // namespace content |
| OLD | NEW |