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

Unified Diff: net/udp/udp_socket_posix.cc

Issue 2048523002: Fix base::GetNativeLibraryName() for Mac. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@native_lib_clean
Patch Set: Address comments, merge variables. Created 4 years, 6 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 side-by-side diff with in-line comments
Download patch
Index: net/udp/udp_socket_posix.cc
diff --git a/net/udp/udp_socket_posix.cc b/net/udp/udp_socket_posix.cc
index 4697dff9f43af34ee63541bec283e040a2d5dc08..205be372de5f602c1457a4876181bf8b75ba3c7d 100644
--- a/net/udp/udp_socket_posix.cc
+++ b/net/udp/udp_socket_posix.cc
@@ -352,8 +352,8 @@ int UDPSocketPosix::BindToNetwork(
if (setNetworkForSocket == nullptr) {
// Android's netd client library should always be loaded in our address
// space as it shims libc functions like connect().
- base::FilePath file(base::FilePath::FromUTF16Unsafe(
- base::GetNativeLibraryName(base::ASCIIToUTF16("netd_client"))));
+ base::FilePath file(base::FilePath::FromUTF8Unsafe(
Mark Mentovai 2016/06/13 19:29:03 Is FromUTF8Unsafe() even needed in this Android-on
Lei Zhang 2016/06/13 21:30:34 Nope.
+ base::GetNativeLibraryName("netd_client")));
base::NativeLibrary lib = base::LoadNativeLibrary(file, nullptr);
setNetworkForSocket = reinterpret_cast<SetNetworkForSocket>(
base::GetFunctionPointerFromNativeLibrary(lib, "setNetworkForSocket"));

Powered by Google App Engine
This is Rietveld 408576698