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

Side by Side Diff: jingle/glue/utils.h

Issue 1405963021: Add support for default local address in IpcNetworkManager (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix a sizeof Created 5 years, 1 month 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 | « content/renderer/p2p/socket_dispatcher.cc ('k') | jingle/glue/utils.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) 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 #ifndef JINGLE_GLUE_UTILS_H_ 5 #ifndef JINGLE_GLUE_UTILS_H_
6 #define JINGLE_GLUE_UTILS_H_ 6 #define JINGLE_GLUE_UTILS_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "net/base/ip_address_number.h"
11 #include "third_party/webrtc/base/ipaddress.h"
12
10 namespace net { 13 namespace net {
11 class IPEndPoint; 14 class IPEndPoint;
12 } // namespace net 15 } // namespace net
13 16
14 namespace rtc { 17 namespace rtc {
15 class SocketAddress; 18 class SocketAddress;
16 } // namespace rtc 19 } // namespace rtc
17 20
18 namespace cricket { 21 namespace cricket {
19 class Candidate; 22 class Candidate;
20 } // namespace cricket 23 } // namespace cricket
21 24
22 namespace jingle_glue { 25 namespace jingle_glue {
23 26
24 // Chromium and libjingle represent socket addresses differently. The 27 // Chromium and libjingle represent socket addresses differently. The
25 // following two functions are used to convert addresses from one 28 // following two functions are used to convert addresses from one
26 // representation to another. 29 // representation to another.
27 bool IPEndPointToSocketAddress(const net::IPEndPoint& ip_endpoint, 30 bool IPEndPointToSocketAddress(const net::IPEndPoint& ip_endpoint,
28 rtc::SocketAddress* address); 31 rtc::SocketAddress* address);
29 bool SocketAddressToIPEndPoint(const rtc::SocketAddress& address, 32 bool SocketAddressToIPEndPoint(const rtc::SocketAddress& address,
30 net::IPEndPoint* ip_endpoint); 33 net::IPEndPoint* ip_endpoint);
31 34
35 rtc::IPAddress IPAddressNumberToIPAddress(
36 const net::IPAddressNumber& ip_address_number);
37
32 // Helper functions to serialize and deserialize P2P candidates. 38 // Helper functions to serialize and deserialize P2P candidates.
33 std::string SerializeP2PCandidate(const cricket::Candidate& candidate); 39 std::string SerializeP2PCandidate(const cricket::Candidate& candidate);
34 bool DeserializeP2PCandidate(const std::string& address, 40 bool DeserializeP2PCandidate(const std::string& address,
35 cricket::Candidate* candidate); 41 cricket::Candidate* candidate);
36 42
37 } // namespace jingle_glue 43 } // namespace jingle_glue
38 44
39 #endif // JINGLE_GLUE_UTILS_H_ 45 #endif // JINGLE_GLUE_UTILS_H_
OLDNEW
« no previous file with comments | « content/renderer/p2p/socket_dispatcher.cc ('k') | jingle/glue/utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698