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

Side by Side Diff: ppapi/shared_impl/private/net_address_private_impl.cc

Issue 15600004: move kInvalidNetAddress to constants file for split_link (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 7 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 | Annotate | Revision Log
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 "ppapi/shared_impl/private/net_address_private_impl.h" 5 #include "ppapi/shared_impl/private/net_address_private_impl.h"
6 6
7 #if defined(OS_WIN) 7 #if defined(OS_WIN)
8 #include <windows.h> 8 #include <windows.h>
9 #include <winsock2.h> 9 #include <winsock2.h>
10 #include <ws2tcpip.h> 10 #include <ws2tcpip.h>
(...skipping 377 matching lines...) Expand 10 before | Expand all | Expand 10 after
388 388
389 PPAPI_THUNK_EXPORT const PPB_NetAddress_Private_1_1* 389 PPAPI_THUNK_EXPORT const PPB_NetAddress_Private_1_1*
390 GetPPB_NetAddress_Private_1_1_Thunk() { 390 GetPPB_NetAddress_Private_1_1_Thunk() {
391 return &net_address_private_interface_1_1; 391 return &net_address_private_interface_1_1;
392 } 392 }
393 393
394 } // namespace thunk 394 } // namespace thunk
395 395
396 // For the NaCl target, all we need are the API functions and the thunk. 396 // For the NaCl target, all we need are the API functions and the thunk.
397 #if !defined(OS_NACL) 397 #if !defined(OS_NACL)
398 // static
399 const PP_NetAddress_Private NetAddressPrivateImpl::kInvalidNetAddress = { 0 };
400 398
401 // static 399 // static
402 bool NetAddressPrivateImpl::ValidateNetAddress( 400 bool NetAddressPrivateImpl::ValidateNetAddress(
403 const PP_NetAddress_Private& addr) { 401 const PP_NetAddress_Private& addr) {
404 return IsValid(ToNetAddress(&addr)); 402 return IsValid(ToNetAddress(&addr));
405 } 403 }
406 404
407 // static 405 // static
408 bool NetAddressPrivateImpl::SockaddrToNetAddress( 406 bool NetAddressPrivateImpl::SockaddrToNetAddress(
409 const sockaddr* sa, 407 const sockaddr* sa,
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
505 // On Windows, |NetAddressToString()| doesn't work in the sandbox. On Mac, 503 // On Windows, |NetAddressToString()| doesn't work in the sandbox. On Mac,
506 // the output isn't consistent with RFC 5952, at least on Mac OS 10.6: 504 // the output isn't consistent with RFC 5952, at least on Mac OS 10.6:
507 // |getnameinfo()| collapses length-one runs of zeros (and also doesn't 505 // |getnameinfo()| collapses length-one runs of zeros (and also doesn't
508 // display the scope). 506 // display the scope).
509 if (net_addr->is_ipv6) 507 if (net_addr->is_ipv6)
510 return ConvertIPv6AddressToString(net_addr, include_port); 508 return ConvertIPv6AddressToString(net_addr, include_port);
511 return ConvertIPv4AddressToString(net_addr, include_port); 509 return ConvertIPv4AddressToString(net_addr, include_port);
512 } 510 }
513 511
514 } // namespace ppapi 512 } // namespace ppapi
OLDNEW
« no previous file with comments | « ppapi/ppapi_shared.gypi ('k') | ppapi/shared_impl/private/net_address_private_impl_constants.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698