diff options
author | yzshen@chromium.org <yzshen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-06-24 23:17:46 +0000 |
---|---|---|
committer | yzshen@chromium.org <yzshen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-06-24 23:17:46 +0000 |
commit | ddecdae52c53779b784bd0daec192ae0a3afe925 (patch) | |
tree | 595d2b6e2aaf41d8f0a76b54bf84a43ee90eb2e8 /remoting | |
parent | 3b4b2f071a372d1645ab6d121c37c18c29458705 (diff) | |
download | chromium_src-ddecdae52c53779b784bd0daec192ae0a3afe925.zip chromium_src-ddecdae52c53779b784bd0daec192ae0a3afe925.tar.gz chromium_src-ddecdae52c53779b784bd0daec192ae0a3afe925.tar.bz2 |
Add "PRIVATE" to the enum names of some private Pepper networking APIs:
- ppb_net_address_private.idl
- ppb_host_resolver_private.idl
- ppb_tcp_socket_private.idl
- ppb_udp_socket_private.idl
Currently, we have very similar enum names in the private and public
Pepper networking APIs (for example, PP_NETADDRESSFAMILY_IPV4
and PP_NETADDRESS_FAMILY_IPV4). The purpose of this CL is to make the
distinction more clear.
This CL doesn't break existing plugins compiled with old private networking enums (without "PRIVATE" in the names). They will still run on newer versions of Chrome.
The only consequence is that they will get compile errors when they compile with new SDK (with new enum names). But the errors should be very straightforward to fix.
BUG=253583
TEST=None
R=bbudge@chromium.org, tsepez@chromium.org, wez@chromium.org
Review URL: https://codereview.chromium.org/17615004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@208291 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'remoting')
-rw-r--r-- | remoting/client/plugin/pepper_network_manager.cc | 4 | ||||
-rw-r--r-- | remoting/client/plugin/pepper_port_allocator.cc | 2 | ||||
-rw-r--r-- | remoting/client/plugin/pepper_util.cc | 4 |
3 files changed, 5 insertions, 5 deletions
diff --git a/remoting/client/plugin/pepper_network_manager.cc b/remoting/client/plugin/pepper_network_manager.cc index e03be2c..afe79a0 100644 --- a/remoting/client/plugin/pepper_network_manager.cc +++ b/remoting/client/plugin/pepper_network_manager.cc @@ -74,14 +74,14 @@ void PepperNetworkManager::OnNetworkList(const pp::NetworkListPrivate& list) { // TODO(sergeyu): Copy all addresses, not only the first one. talk_base::IPAddress address; switch (pp::NetAddressPrivate::GetFamily(addresses[0])) { - case PP_NETADDRESSFAMILY_IPV4: { + case PP_NETADDRESSFAMILY_PRIVATE_IPV4: { in_addr* address_ipv4 = reinterpret_cast<in_addr*>(address_bytes); address = talk_base::IPAddress(*address_ipv4); prefix_length = sizeof(in_addr) * 8; break; } - case PP_NETADDRESSFAMILY_IPV6: { + case PP_NETADDRESSFAMILY_PRIVATE_IPV6: { in6_addr* address_ipv6 = reinterpret_cast<in6_addr*>(address_bytes); address = talk_base::IPAddress(*address_ipv6); prefix_length = sizeof(in6_addr) * 8; diff --git a/remoting/client/plugin/pepper_port_allocator.cc b/remoting/client/plugin/pepper_port_allocator.cc index 6c435ce..3b5c241 100644 --- a/remoting/client/plugin/pepper_port_allocator.cc +++ b/remoting/client/plugin/pepper_port_allocator.cc @@ -155,7 +155,7 @@ void PepperPortAllocatorSession::ResolveStunServerAddress() { PP_HostResolver_Private_Hint hint; hint.flags = 0; - hint.family = PP_NETADDRESSFAMILY_IPV4; + hint.family = PP_NETADDRESSFAMILY_PRIVATE_IPV4; int result = stun_address_resolver_.Resolve( hostname, port, hint, PpCompletionCallback(base::Bind( diff --git a/remoting/client/plugin/pepper_util.cc b/remoting/client/plugin/pepper_util.cc index c230842..3dc8e81 100644 --- a/remoting/client/plugin/pepper_util.cc +++ b/remoting/client/plugin/pepper_util.cc @@ -65,11 +65,11 @@ bool PpAddressToSocketAddress(const PP_NetAddress_Private& pp_address, if (result) { switch (pp::NetAddressPrivate::GetFamily(pp_address)) { - case PP_NETADDRESSFAMILY_IPV4: + case PP_NETADDRESSFAMILY_PRIVATE_IPV4: address->SetIP(talk_base::IPAddress( *reinterpret_cast<in_addr*>(addr_storage))); break; - case PP_NETADDRESSFAMILY_IPV6: + case PP_NETADDRESSFAMILY_PRIVATE_IPV6: address->SetIP(talk_base::IPAddress( *reinterpret_cast<in6_addr*>(addr_storage))); break; |