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 /ppapi | |
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 'ppapi')
21 files changed, 68 insertions, 59 deletions
diff --git a/ppapi/api/private/ppb_host_resolver_private.idl b/ppapi/api/private/ppb_host_resolver_private.idl index 4db93bf..f7b0e4a 100644 --- a/ppapi/api/private/ppb_host_resolver_private.idl +++ b/ppapi/api/private/ppb_host_resolver_private.idl @@ -21,11 +21,11 @@ enum PP_HostResolver_Private_Flags { /** * AI_CANONNAME */ - PP_HOST_RESOLVER_FLAGS_CANONNAME = 1 << 0, + PP_HOST_RESOLVER_PRIVATE_FLAGS_CANONNAME = 1 << 0, /** * Hint to the resolver that only loopback addresses are configured. */ - PP_HOST_RESOLVER_FLAGS_LOOPBACK_ONLY = 1 << 1 + PP_HOST_RESOLVER_PRIVATE_FLAGS_LOOPBACK_ONLY = 1 << 1 }; [assert_size(8)] diff --git a/ppapi/api/private/ppb_net_address_private.idl b/ppapi/api/private/ppb_net_address_private.idl index cf6804c..9feb503 100644 --- a/ppapi/api/private/ppb_net_address_private.idl +++ b/ppapi/api/private/ppb_net_address_private.idl @@ -19,15 +19,15 @@ enum PP_NetAddressFamily_Private { /** * The address family is unspecified. */ - PP_NETADDRESSFAMILY_UNSPECIFIED = 0, + PP_NETADDRESSFAMILY_PRIVATE_UNSPECIFIED = 0, /** * The Internet Protocol version 4 (IPv4) address family. */ - PP_NETADDRESSFAMILY_IPV4 = 1, + PP_NETADDRESSFAMILY_PRIVATE_IPV4 = 1, /** * The Internet Protocol version 6 (IPv6) address family. */ - PP_NETADDRESSFAMILY_IPV6 = 2 + PP_NETADDRESSFAMILY_PRIVATE_IPV6 = 2 }; /** diff --git a/ppapi/api/private/ppb_tcp_socket_private.idl b/ppapi/api/private/ppb_tcp_socket_private.idl index 5c5d54a..b9913bc 100644 --- a/ppapi/api/private/ppb_tcp_socket_private.idl +++ b/ppapi/api/private/ppb_tcp_socket_private.idl @@ -16,12 +16,12 @@ label Chrome { [assert_size(4)] enum PP_TCPSocketOption_Private { // Special value used for testing. Guaranteed to fail SetOption(). - PP_TCPSOCKETOPTION_INVALID = 0, + PP_TCPSOCKETOPTION_PRIVATE_INVALID = 0, // Disable coalescing of small writes to make TCP segments, and instead // deliver data immediately. For SSL sockets, this option must be set before // SSLHandshake() is called. Value type is PP_VARTYPE_BOOL. - PP_TCPSOCKETOPTION_NO_DELAY = 1 + PP_TCPSOCKETOPTION_PRIVATE_NO_DELAY = 1 }; /** diff --git a/ppapi/api/private/ppb_udp_socket_private.idl b/ppapi/api/private/ppb_udp_socket_private.idl index fc4fe1c..9888a54 100644 --- a/ppapi/api/private/ppb_udp_socket_private.idl +++ b/ppapi/api/private/ppb_udp_socket_private.idl @@ -18,15 +18,15 @@ enum PP_UDPSocketFeature_Private { // Allow the socket to share the local address to which socket will // be bound with other processes. Value's type should be // PP_VARTYPE_BOOL. - PP_UDPSOCKETFEATURE_ADDRESS_REUSE = 0, + PP_UDPSOCKETFEATURE_PRIVATE_ADDRESS_REUSE = 0, // Allow sending and receiving packets sent to and from broadcast // addresses. Value's type should be PP_VARTYPE_BOOL. - PP_UDPSOCKETFEATURE_BROADCAST = 1, + PP_UDPSOCKETFEATURE_PRIVATE_BROADCAST = 1, // Special value for counting the number of available // features. Should not be passed to SetSocketFeature(). - PP_UDPSOCKETFEATURE_COUNT = 2 + PP_UDPSOCKETFEATURE_PRIVATE_COUNT = 2 }; interface PPB_UDPSocket_Private { diff --git a/ppapi/c/private/ppb_host_resolver_private.h b/ppapi/c/private/ppb_host_resolver_private.h index 34346eb..3845386 100644 --- a/ppapi/c/private/ppb_host_resolver_private.h +++ b/ppapi/c/private/ppb_host_resolver_private.h @@ -4,7 +4,7 @@ */ /* From private/ppb_host_resolver_private.idl, - * modified Mon Mar 5 17:39:57 2012. + * modified Mon Jun 24 09:49:40 2013. */ #ifndef PPAPI_C_PRIVATE_PPB_HOST_RESOLVER_PRIVATE_H_ @@ -42,11 +42,11 @@ typedef enum { /** * AI_CANONNAME */ - PP_HOST_RESOLVER_FLAGS_CANONNAME = 1 << 0, + PP_HOST_RESOLVER_PRIVATE_FLAGS_CANONNAME = 1 << 0, /** * Hint to the resolver that only loopback addresses are configured. */ - PP_HOST_RESOLVER_FLAGS_LOOPBACK_ONLY = 1 << 1 + PP_HOST_RESOLVER_PRIVATE_FLAGS_LOOPBACK_ONLY = 1 << 1 } PP_HostResolver_Private_Flags; PP_COMPILE_ASSERT_SIZE_IN_BYTES(PP_HostResolver_Private_Flags, 4); /** diff --git a/ppapi/c/private/ppb_net_address_private.h b/ppapi/c/private/ppb_net_address_private.h index 2ae1366..82f6e45 100644 --- a/ppapi/c/private/ppb_net_address_private.h +++ b/ppapi/c/private/ppb_net_address_private.h @@ -4,7 +4,7 @@ */ /* From private/ppb_net_address_private.idl, - * modified Sat Oct 20 12:39:54 2012. + * modified Mon Jun 24 09:52:39 2013. */ #ifndef PPAPI_C_PRIVATE_PPB_NET_ADDRESS_PRIVATE_H_ @@ -35,15 +35,15 @@ typedef enum { /** * The address family is unspecified. */ - PP_NETADDRESSFAMILY_UNSPECIFIED = 0, + PP_NETADDRESSFAMILY_PRIVATE_UNSPECIFIED = 0, /** * The Internet Protocol version 4 (IPv4) address family. */ - PP_NETADDRESSFAMILY_IPV4 = 1, + PP_NETADDRESSFAMILY_PRIVATE_IPV4 = 1, /** * The Internet Protocol version 6 (IPv6) address family. */ - PP_NETADDRESSFAMILY_IPV6 = 2 + PP_NETADDRESSFAMILY_PRIVATE_IPV6 = 2 } PP_NetAddressFamily_Private; PP_COMPILE_ASSERT_SIZE_IN_BYTES(PP_NetAddressFamily_Private, 4); /** diff --git a/ppapi/c/private/ppb_tcp_socket_private.h b/ppapi/c/private/ppb_tcp_socket_private.h index 6aad467..8d47872 100644 --- a/ppapi/c/private/ppb_tcp_socket_private.h +++ b/ppapi/c/private/ppb_tcp_socket_private.h @@ -3,7 +3,7 @@ * found in the LICENSE file. */ -/* From private/ppb_tcp_socket_private.idl modified Sun Feb 10 00:28:07 2013. */ +/* From private/ppb_tcp_socket_private.idl modified Mon Jun 24 09:53:12 2013. */ #ifndef PPAPI_C_PRIVATE_PPB_TCP_SOCKET_PRIVATE_H_ #define PPAPI_C_PRIVATE_PPB_TCP_SOCKET_PRIVATE_H_ @@ -34,11 +34,11 @@ */ typedef enum { /* Special value used for testing. Guaranteed to fail SetOption(). */ - PP_TCPSOCKETOPTION_INVALID = 0, + PP_TCPSOCKETOPTION_PRIVATE_INVALID = 0, /* Disable coalescing of small writes to make TCP segments, and instead * deliver data immediately. For SSL sockets, this option must be set before * SSLHandshake() is called. Value type is PP_VARTYPE_BOOL. */ - PP_TCPSOCKETOPTION_NO_DELAY = 1 + PP_TCPSOCKETOPTION_PRIVATE_NO_DELAY = 1 } PP_TCPSocketOption_Private; PP_COMPILE_ASSERT_SIZE_IN_BYTES(PP_TCPSocketOption_Private, 4); /** diff --git a/ppapi/c/private/ppb_udp_socket_private.h b/ppapi/c/private/ppb_udp_socket_private.h index 27770b1..d6e283c 100644 --- a/ppapi/c/private/ppb_udp_socket_private.h +++ b/ppapi/c/private/ppb_udp_socket_private.h @@ -3,7 +3,7 @@ * found in the LICENSE file. */ -/* From private/ppb_udp_socket_private.idl modified Thu Aug 23 12:32:12 2012. */ +/* From private/ppb_udp_socket_private.idl modified Mon Jun 24 09:53:43 2013. */ #ifndef PPAPI_C_PRIVATE_PPB_UDP_SOCKET_PRIVATE_H_ #define PPAPI_C_PRIVATE_PPB_UDP_SOCKET_PRIVATE_H_ @@ -36,13 +36,13 @@ typedef enum { /* Allow the socket to share the local address to which socket will * be bound with other processes. Value's type should be * PP_VARTYPE_BOOL. */ - PP_UDPSOCKETFEATURE_ADDRESS_REUSE = 0, + PP_UDPSOCKETFEATURE_PRIVATE_ADDRESS_REUSE = 0, /* Allow sending and receiving packets sent to and from broadcast * addresses. Value's type should be PP_VARTYPE_BOOL. */ - PP_UDPSOCKETFEATURE_BROADCAST = 1, + PP_UDPSOCKETFEATURE_PRIVATE_BROADCAST = 1, /* Special value for counting the number of available * features. Should not be passed to SetSocketFeature(). */ - PP_UDPSOCKETFEATURE_COUNT = 2 + PP_UDPSOCKETFEATURE_PRIVATE_COUNT = 2 } PP_UDPSocketFeature_Private; PP_COMPILE_ASSERT_SIZE_IN_BYTES(PP_UDPSocketFeature_Private, 4); /** diff --git a/ppapi/cpp/private/net_address_private.cc b/ppapi/cpp/private/net_address_private.cc index 0e881c7..3a32827 100644 --- a/ppapi/cpp/private/net_address_private.cc +++ b/ppapi/cpp/private/net_address_private.cc @@ -150,7 +150,7 @@ PP_NetAddressFamily_Private NetAddressPrivate::GetFamily( return get_interface<PPB_NetAddress_Private_1_1>()->GetFamily(&addr); if (has_interface<PPB_NetAddress_Private_1_0>()) return get_interface<PPB_NetAddress_Private_1_0>()->GetFamily(&addr); - return PP_NETADDRESSFAMILY_UNSPECIFIED; + return PP_NETADDRESSFAMILY_PRIVATE_UNSPECIFIED; } // static diff --git a/ppapi/proxy/host_resolver_resource.cc b/ppapi/proxy/host_resolver_resource.cc index c21d482..a289856 100644 --- a/ppapi/proxy/host_resolver_resource.cc +++ b/ppapi/proxy/host_resolver_resource.cc @@ -19,22 +19,22 @@ PP_HostResolver_Private_Hint ConvertToHostResolverPrivateHint( PP_HostResolver_Private_Hint private_hint; switch (hint.family) { case PP_NETADDRESS_FAMILY_UNSPECIFIED: - private_hint.family = PP_NETADDRESSFAMILY_UNSPECIFIED; + private_hint.family = PP_NETADDRESSFAMILY_PRIVATE_UNSPECIFIED; break; case PP_NETADDRESS_FAMILY_IPV4: - private_hint.family = PP_NETADDRESSFAMILY_IPV4; + private_hint.family = PP_NETADDRESSFAMILY_PRIVATE_IPV4; break; case PP_NETADDRESS_FAMILY_IPV6: - private_hint.family = PP_NETADDRESSFAMILY_IPV6; + private_hint.family = PP_NETADDRESSFAMILY_PRIVATE_IPV6; break; default: NOTREACHED(); - private_hint.family = PP_NETADDRESSFAMILY_UNSPECIFIED; + private_hint.family = PP_NETADDRESSFAMILY_PRIVATE_UNSPECIFIED; } private_hint.flags = 0; if (hint.flags & PP_HOSTRESOLVER_FLAG_CANONNAME) - private_hint.flags |= PP_HOST_RESOLVER_FLAGS_CANONNAME; + private_hint.flags |= PP_HOST_RESOLVER_PRIVATE_FLAGS_CANONNAME; return private_hint; } diff --git a/ppapi/proxy/ppapi_messages.h b/ppapi/proxy/ppapi_messages.h index 63f23b58..7452807 100644 --- a/ppapi/proxy/ppapi_messages.h +++ b/ppapi/proxy/ppapi_messages.h @@ -84,7 +84,8 @@ IPC_ENUM_TRAITS(PP_FlashSetting) IPC_ENUM_TRAITS(PP_ImageDataFormat) IPC_ENUM_TRAITS(PP_InputEvent_MouseButton) IPC_ENUM_TRAITS(PP_InputEvent_Type) -IPC_ENUM_TRAITS_MAX_VALUE(PP_NetAddressFamily_Private, PP_NETADDRESSFAMILY_IPV6) +IPC_ENUM_TRAITS_MAX_VALUE(PP_NetAddressFamily_Private, + PP_NETADDRESSFAMILY_PRIVATE_IPV6) IPC_ENUM_TRAITS(PP_NetworkListState_Private) IPC_ENUM_TRAITS(PP_NetworkListType_Private) IPC_ENUM_TRAITS(PP_PrintOrientation_Dev) diff --git a/ppapi/proxy/udp_socket_private_resource.cc b/ppapi/proxy/udp_socket_private_resource.cc index ee14bdd..af43c10 100644 --- a/ppapi/proxy/udp_socket_private_resource.cc +++ b/ppapi/proxy/udp_socket_private_resource.cc @@ -29,13 +29,13 @@ int32_t UDPSocketPrivateResource::SetSocketFeature( PP_Var value) { PP_UDPSocket_Option public_name = PP_UDPSOCKET_OPTION_ADDRESS_REUSE; switch (name) { - case PP_UDPSOCKETFEATURE_ADDRESS_REUSE: + case PP_UDPSOCKETFEATURE_PRIVATE_ADDRESS_REUSE: // |public_name| has been initialized above. break; - case PP_UDPSOCKETFEATURE_BROADCAST: + case PP_UDPSOCKETFEATURE_PRIVATE_BROADCAST: public_name = PP_UDPSOCKET_OPTION_BROADCAST; break; - case PP_UDPSOCKETFEATURE_COUNT: + case PP_UDPSOCKETFEATURE_PRIVATE_COUNT: return PP_ERROR_BADARGUMENT; default: NOTREACHED(); diff --git a/ppapi/shared_impl/private/net_address_private_impl.cc b/ppapi/shared_impl/private/net_address_private_impl.cc index 35231d5..19dae3c 100644 --- a/ppapi/shared_impl/private/net_address_private_impl.cc +++ b/ppapi/shared_impl/private/net_address_private_impl.cc @@ -133,9 +133,9 @@ bool IsValid(const NetAddress* net_addr) { PP_NetAddressFamily_Private GetFamily(const PP_NetAddress_Private* addr) { const NetAddress* net_addr = ToNetAddress(addr); if (!IsValid(net_addr)) - return PP_NETADDRESSFAMILY_UNSPECIFIED; + return PP_NETADDRESSFAMILY_PRIVATE_UNSPECIFIED; return net_addr->is_ipv6 ? - PP_NETADDRESSFAMILY_IPV6 : PP_NETADDRESSFAMILY_IPV4; + PP_NETADDRESSFAMILY_PRIVATE_IPV6 : PP_NETADDRESSFAMILY_PRIVATE_IPV4; } uint16_t GetPort(const PP_NetAddress_Private* addr) { diff --git a/ppapi/shared_impl/private/tcp_socket_private_impl.cc b/ppapi/shared_impl/private/tcp_socket_private_impl.cc index ce8f03a..56a3585b 100644 --- a/ppapi/shared_impl/private/tcp_socket_private_impl.cc +++ b/ppapi/shared_impl/private/tcp_socket_private_impl.cc @@ -89,9 +89,9 @@ int32_t TCPSocketPrivateImpl::SetOption( const PP_Var& value, scoped_refptr<TrackedCallback> callback) { switch (name) { - case PP_TCPSOCKETOPTION_INVALID: + case PP_TCPSOCKETOPTION_PRIVATE_INVALID: return PP_ERROR_BADARGUMENT; - case PP_TCPSOCKETOPTION_NO_DELAY: + case PP_TCPSOCKETOPTION_PRIVATE_NO_DELAY: return SetOptionImpl(PP_TCPSOCKET_OPTION_NO_DELAY, value, callback); default: NOTREACHED(); diff --git a/ppapi/tests/test_host_resolver_private.cc b/ppapi/tests/test_host_resolver_private.cc index 72153af..88429ed 100644 --- a/ppapi/tests/test_host_resolver_private.cc +++ b/ppapi/tests/test_host_resolver_private.cc @@ -171,14 +171,14 @@ std::string TestHostResolverPrivate::ParametrizedTestResolve( std::string TestHostResolverPrivate::TestResolve() { PP_HostResolver_Private_Hint hint; - hint.family = PP_NETADDRESSFAMILY_UNSPECIFIED; - hint.flags = PP_HOST_RESOLVER_FLAGS_CANONNAME; + hint.family = PP_NETADDRESSFAMILY_PRIVATE_UNSPECIFIED; + hint.flags = PP_HOST_RESOLVER_PRIVATE_FLAGS_CANONNAME; return ParametrizedTestResolve(hint); } std::string TestHostResolverPrivate::TestResolveIPv4() { PP_HostResolver_Private_Hint hint; - hint.family = PP_NETADDRESSFAMILY_IPV4; - hint.flags = PP_HOST_RESOLVER_FLAGS_CANONNAME; + hint.family = PP_NETADDRESSFAMILY_PRIVATE_IPV4; + hint.flags = PP_HOST_RESOLVER_PRIVATE_FLAGS_CANONNAME; return ParametrizedTestResolve(hint); } diff --git a/ppapi/tests/test_host_resolver_private_disallowed.cc b/ppapi/tests/test_host_resolver_private_disallowed.cc index 3c0e0d5..0e28dce 100644 --- a/ppapi/tests/test_host_resolver_private_disallowed.cc +++ b/ppapi/tests/test_host_resolver_private_disallowed.cc @@ -39,8 +39,8 @@ void TestHostResolverPrivateDisallowed::RunTests(const std::string& filter) { std::string TestHostResolverPrivateDisallowed::TestResolve() { pp::HostResolverPrivate host_resolver(instance_); PP_HostResolver_Private_Hint hint; - hint.family = PP_NETADDRESSFAMILY_UNSPECIFIED; - hint.flags = PP_HOST_RESOLVER_FLAGS_CANONNAME; + hint.family = PP_NETADDRESSFAMILY_PRIVATE_UNSPECIFIED; + hint.flags = PP_HOST_RESOLVER_PRIVATE_FLAGS_CANONNAME; TestCompletionCallback callback(instance_->pp_instance(), callback_type()); callback.WaitForResult( host_resolver.Resolve(host_, port_, hint, callback.GetCallback())); diff --git a/ppapi/tests/test_net_address_private.cc b/ppapi/tests/test_net_address_private.cc index 7b35e66..a3474c2 100644 --- a/ppapi/tests/test_net_address_private.cc +++ b/ppapi/tests/test_net_address_private.cc @@ -231,11 +231,13 @@ std::string TestNetAddressPrivate::TestDescribeIPv6() { std::string TestNetAddressPrivate::TestGetFamily() { uint8_t localhost_ip[4] = { 127, 0, 0, 1 }; PP_NetAddress_Private ipv4 = MakeIPv4NetAddress(localhost_ip, 80); - ASSERT_EQ(NetAddressPrivate::GetFamily(ipv4), PP_NETADDRESSFAMILY_IPV4); + ASSERT_EQ(NetAddressPrivate::GetFamily(ipv4), + PP_NETADDRESSFAMILY_PRIVATE_IPV4); uint16_t ipv6_address[8] = { 0x1234, 0xabcd, 0, 0, 0xff, 0, 0, 0xcdef }; PP_NetAddress_Private ipv6 = MakeIPv6NetAddress(ipv6_address, 123, 0); - ASSERT_EQ(NetAddressPrivate::GetFamily(ipv6), PP_NETADDRESSFAMILY_IPV6); + ASSERT_EQ(NetAddressPrivate::GetFamily(ipv6), + PP_NETADDRESSFAMILY_PRIVATE_IPV6); PASS(); } diff --git a/ppapi/tests/test_network_monitor_private.cc b/ppapi/tests/test_network_monitor_private.cc index dbe8683..b2114da 100644 --- a/ppapi/tests/test_network_monitor_private.cc +++ b/ppapi/tests/test_network_monitor_private.cc @@ -100,8 +100,8 @@ std::string TestNetworkMonitorPrivate::VerifyNetworkList( PP_NetAddressFamily_Private family = pp::NetAddressPrivate::GetFamily(addresses[i]); - ASSERT_TRUE(family == PP_NETADDRESSFAMILY_IPV4 || - family == PP_NETADDRESSFAMILY_IPV6); + ASSERT_TRUE(family == PP_NETADDRESSFAMILY_PRIVATE_IPV4 || + family == PP_NETADDRESSFAMILY_PRIVATE_IPV6); char ip[16] = { 0 }; ASSERT_TRUE(pp::NetAddressPrivate::GetAddress( diff --git a/ppapi/tests/test_tcp_socket_private.cc b/ppapi/tests/test_tcp_socket_private.cc index b6f158f..ba1c8f1 100644 --- a/ppapi/tests/test_tcp_socket_private.cc +++ b/ppapi/tests/test_tcp_socket_private.cc @@ -155,7 +155,8 @@ std::string TestTCPSocketPrivate::TestSetOption() { TestCompletionCallback cb(instance_->pp_instance(), callback_type()); cb.WaitForResult( - socket.SetOption(PP_TCPSOCKETOPTION_NO_DELAY, true, cb.GetCallback())); + socket.SetOption(PP_TCPSOCKETOPTION_PRIVATE_NO_DELAY, true, + cb.GetCallback())); CHECK_CALLBACK_BEHAVIOR(cb); ASSERT_EQ(PP_ERROR_FAILED, cb.result()); @@ -164,12 +165,14 @@ std::string TestTCPSocketPrivate::TestSetOption() { ASSERT_EQ(PP_OK, cb.result()); cb.WaitForResult( - socket.SetOption(PP_TCPSOCKETOPTION_NO_DELAY, true, cb.GetCallback())); + socket.SetOption(PP_TCPSOCKETOPTION_PRIVATE_NO_DELAY, true, + cb.GetCallback())); CHECK_CALLBACK_BEHAVIOR(cb); ASSERT_EQ(PP_OK, cb.result()); cb.WaitForResult( - socket.SetOption(PP_TCPSOCKETOPTION_INVALID, true, cb.GetCallback())); + socket.SetOption(PP_TCPSOCKETOPTION_PRIVATE_INVALID, true, + cb.GetCallback())); CHECK_CALLBACK_BEHAVIOR(cb); ASSERT_EQ(PP_ERROR_BADARGUMENT, cb.result()); diff --git a/ppapi/tests/test_udp_socket_private.cc b/ppapi/tests/test_udp_socket_private.cc index 1380135..ae1b978 100644 --- a/ppapi/tests/test_udp_socket_private.cc +++ b/ppapi/tests/test_udp_socket_private.cc @@ -75,12 +75,13 @@ std::string TestUDPSocketPrivate::GetLocalAddress( std::string TestUDPSocketPrivate::SetBroadcastOptions( pp::UDPSocketPrivate* socket) { - int32_t rv = socket->SetSocketFeature(PP_UDPSOCKETFEATURE_ADDRESS_REUSE, - pp::Var(true)); + int32_t rv = socket->SetSocketFeature( + PP_UDPSOCKETFEATURE_PRIVATE_ADDRESS_REUSE, pp::Var(true)); if (rv != PP_OK) return ReportError("PPB_UDPSocket_Private::SetSocketFeature", rv); - rv = socket->SetSocketFeature(PP_UDPSOCKETFEATURE_BROADCAST, pp::Var(true)); + rv = socket->SetSocketFeature(PP_UDPSOCKETFEATURE_PRIVATE_BROADCAST, + pp::Var(true)); if (rv != PP_OK) return ReportError("PPB_UDPSocket_Private::SetSocketFeature", rv); @@ -246,12 +247,13 @@ std::string TestUDPSocketPrivate::TestBroadcast() { std::string TestUDPSocketPrivate::TestSetSocketFeatureErrors() { pp::UDPSocketPrivate socket(instance_); // Try to pass incorrect feature name. - int32_t rv = socket.SetSocketFeature(PP_UDPSOCKETFEATURE_COUNT, + int32_t rv = socket.SetSocketFeature(PP_UDPSOCKETFEATURE_PRIVATE_COUNT, pp::Var(true)); ASSERT_EQ(PP_ERROR_BADARGUMENT, rv); // Try to pass incorrect feature value's type. - rv = socket.SetSocketFeature(PP_UDPSOCKETFEATURE_ADDRESS_REUSE, pp::Var(1)); + rv = socket.SetSocketFeature(PP_UDPSOCKETFEATURE_PRIVATE_ADDRESS_REUSE, + pp::Var(1)); ASSERT_EQ(PP_ERROR_BADARGUMENT, rv); PASS(); } diff --git a/ppapi/tests/test_utils.cc b/ppapi/tests/test_utils.cc index e9814ea..f9fd7b6 100644 --- a/ppapi/tests/test_utils.cc +++ b/ppapi/tests/test_utils.cc @@ -137,7 +137,8 @@ bool ResolveHost(PP_Instance instance, // TODO(yzshen): Change to use the public host resolver once it is supported. pp::InstanceHandle instance_handle(instance); pp::HostResolverPrivate host_resolver(instance_handle); - PP_HostResolver_Private_Hint hint = { PP_NETADDRESSFAMILY_UNSPECIFIED, 0 }; + PP_HostResolver_Private_Hint hint = + { PP_NETADDRESSFAMILY_PRIVATE_UNSPECIFIED, 0 }; TestCompletionCallback callback(instance); callback.WaitForResult( @@ -150,7 +151,7 @@ bool ResolveHost(PP_Instance instance, } switch (pp::NetAddressPrivate::GetFamily(addr_private)) { - case PP_NETADDRESSFAMILY_IPV4: { + case PP_NETADDRESSFAMILY_PRIVATE_IPV4: { PP_NetAddress_IPv4 ipv4_addr; ipv4_addr.port = ConvertToNetEndian16( pp::NetAddressPrivate::GetPort(addr_private)); @@ -161,7 +162,7 @@ bool ResolveHost(PP_Instance instance, *addr = pp::NetAddress(instance_handle, ipv4_addr); return true; } - case PP_NETADDRESSFAMILY_IPV6: { + case PP_NETADDRESSFAMILY_PRIVATE_IPV6: { PP_NetAddress_IPv6 ipv6_addr; ipv6_addr.port = ConvertToNetEndian16( pp::NetAddressPrivate::GetPort(addr_private)); |