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

Unified Diff: src/trusted/plugin/dylib_unittest.cc

Issue 7799028: Remove src/trusted/plugin (Closed) Base URL: svn://svn.chromium.org/native_client/trunk/src/native_client
Patch Set: fix gyp file for necessary -I Created 9 years, 4 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 | « src/trusted/plugin/dylib_unittest.h ('k') | src/trusted/plugin/file_downloader.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/trusted/plugin/dylib_unittest.cc
diff --git a/src/trusted/plugin/dylib_unittest.cc b/src/trusted/plugin/dylib_unittest.cc
deleted file mode 100644
index 2172ef0dad24d61600c500d43c7df566bb1205cf..0000000000000000000000000000000000000000
--- a/src/trusted/plugin/dylib_unittest.cc
+++ /dev/null
@@ -1,41 +0,0 @@
-// Copyright 2010 The Native Client Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can
-// be found in the LICENSE file.
-
-#include "native_client/src/trusted/plugin/dylib_unittest.h"
-
-#include <stdio.h>
-
-#if NACL_WINDOWS
-DylibHandle DylibOpen(const char* lib_path) {
- return LoadLibrary(lib_path);
-}
-
-bool DylibClose(DylibHandle dl_handle) {
- return FreeLibrary(dl_handle) == TRUE;
-}
-
-SymbolHandle GetSymbolHandle(DylibHandle dl_handle, const char* name) {
- return reinterpret_cast<SymbolHandle>(GetProcAddress(dl_handle, name));
-}
-#else
-DylibHandle DylibOpen(const char* lib_path) {
- // By using RTLD_NOW we check that all symbols are resolved before the
- // dlopen completes, or it fails.
- return dlopen(lib_path, RTLD_NOW | RTLD_LOCAL);
-}
-
-bool DylibClose(DylibHandle dl_handle) {
- return dlclose(dl_handle) == 0;
-}
-
-SymbolHandle GetSymbolHandle(DylibHandle dl_handle, const char* name) {
- void* sym_handle = dlsym(dl_handle, name);
- char* error_string = dlerror();
- if (sym_handle == NULL || error_string != NULL) {
- fprintf(stderr, "Couldn't get symbol %s: %s\n", name, error_string);
- sym_handle = NULL;
- }
- return reinterpret_cast<SymbolHandle>(sym_handle);
-}
-#endif
« no previous file with comments | « src/trusted/plugin/dylib_unittest.h ('k') | src/trusted/plugin/file_downloader.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698