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

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: rebase 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
« no previous file with comments | « media/cdm/external_clear_key_test_helper.cc ('k') | third_party/widevine/cdm/widevine_cdm_common.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..401158289a7a730886f59ad5035f132b82114275 100644
--- a/net/udp/udp_socket_posix.cc
+++ b/net/udp/udp_socket_posix.cc
@@ -349,16 +349,15 @@ int UDPSocketPosix::BindToNetwork(
static SetNetworkForSocket setNetworkForSocket;
// This is racy, but all racers should come out with the same answer so it
// shouldn't matter.
- if (setNetworkForSocket == nullptr) {
+ if (!setNetworkForSocket) {
// 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::GetNativeLibraryName("netd_client"));
base::NativeLibrary lib = base::LoadNativeLibrary(file, nullptr);
setNetworkForSocket = reinterpret_cast<SetNetworkForSocket>(
base::GetFunctionPointerFromNativeLibrary(lib, "setNetworkForSocket"));
}
- if (setNetworkForSocket == nullptr)
+ if (!setNetworkForSocket)
return ERR_NOT_IMPLEMENTED;
int rv = setNetworkForSocket(network, socket_);
// If |network| has since disconnected, |rv| will be ENONET. Surface this as
« no previous file with comments | « media/cdm/external_clear_key_test_helper.cc ('k') | third_party/widevine/cdm/widevine_cdm_common.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698