Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(39)

Side by Side Diff: content/renderer/p2p/ipc_network_manager.cc

Issue 9600066: Roll libjingle to r124 and roll webrtc to 1888. (Closed) Base URL: https://src.chromium.org/svn/trunk/src/
Patch Set: Created 8 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « DEPS ('k') | jingle/glue/fake_network_manager.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/sys_byteorder.h" 8 #include "base/sys_byteorder.h"
9 #include "net/base/net_util.h" 9 #include "net/base/net_util.h"
10 10
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 if (!network_list_received_) 45 if (!network_list_received_)
46 network_list_received_ = true; 46 network_list_received_ = true;
47 47
48 std::vector<talk_base::Network*> networks; 48 std::vector<talk_base::Network*> networks;
49 for (net::NetworkInterfaceList::const_iterator it = list.begin(); 49 for (net::NetworkInterfaceList::const_iterator it = list.begin();
50 it != list.end(); it++) { 50 it != list.end(); it++) {
51 uint32 address; 51 uint32 address;
52 if (it->address.size() != net::kIPv4AddressSize) 52 if (it->address.size() != net::kIPv4AddressSize)
53 continue; 53 continue;
54 memcpy(&address, &it->address[0], sizeof(uint32)); 54 memcpy(&address, &it->address[0], sizeof(uint32));
55 address = ntohl(address); 55 address = talk_base::NetworkToHost32(address);
56 networks.push_back( 56 talk_base::Network* network = new talk_base::Network(
57 new talk_base::Network( 57 it->name, it->name, talk_base::IPAddress(address), 32);
58 it->name, it->name, talk_base::IPAddress(address))); 58 network->AddIP(talk_base::IPAddress(address));
59 networks.push_back(network);
59 } 60 }
60 61
61 bool changed = false; 62 bool changed = false;
62 MergeNetworkList(networks, &changed); 63 MergeNetworkList(networks, &changed);
63 if (changed) 64 if (changed)
64 SignalNetworksChanged(); 65 SignalNetworksChanged();
65 } 66 }
66 67
67 void IpcNetworkManager::SendNetworksChangedSignal() { 68 void IpcNetworkManager::SendNetworksChangedSignal() {
68 SignalNetworksChanged(); 69 SignalNetworksChanged();
69 } 70 }
70 71
71 } // namespace content 72 } // namespace content
OLDNEW
« no previous file with comments | « DEPS ('k') | jingle/glue/fake_network_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698