summaryrefslogtreecommitdiffstats
path: root/base/scoped_native_library.h
diff options
context:
space:
mode:
authorlevin@chromium.org <levin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-03-28 01:54:15 +0000
committerlevin@chromium.org <levin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-03-28 01:54:15 +0000
commit3b63f8f451afcf414a59c529f627c620e4d449d9 (patch)
tree2dcbab1c060b29a260c29bb19b67bf97a8293ca3 /base/scoped_native_library.h
parent9174a108509c2aafe513da68e6e63fbc7df38c85 (diff)
downloadchromium_src-3b63f8f451afcf414a59c529f627c620e4d449d9.zip
chromium_src-3b63f8f451afcf414a59c529f627c620e4d449d9.tar.gz
chromium_src-3b63f8f451afcf414a59c529f627c620e4d449d9.tar.bz2
Move some files from base to base/memory.
raw_scoped_refptr_mismatch_checker.h ref_counted.cc ref_counted.h ref_counted_memory.cc ref_counted_memory.h ref_counted_unittest.cc scoped_callback_factory.h scoped_comptr_win.h scoped_handle.h scoped_native_library.cc scoped_native_library.h scoped_native_library_unittest.cc scoped_nsobject.h scoped_open_process.h scoped_ptr.h scoped_ptr_unittest.cc scoped_temp_dir.cc scoped_temp_dir.h scoped_temp_dir_unittest.cc scoped_vector.h singleton.h singleton_objc.h singleton_unittest.cc linked_ptr.h linked_ptr_unittest.cc weak_ptr.cc weak_ptr.h weak_ptr_unittest.cc BUG=None TEST=Compile Review URL: http://codereview.chromium.org/6714032 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@79524 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/scoped_native_library.h')
-rw-r--r--base/scoped_native_library.h53
1 files changed, 0 insertions, 53 deletions
diff --git a/base/scoped_native_library.h b/base/scoped_native_library.h
deleted file mode 100644
index 151bb5f..0000000
--- a/base/scoped_native_library.h
+++ /dev/null
@@ -1,53 +0,0 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef BASE_SCOPED_NATIVE_LIBRARY_H_
-#define BASE_SCOPED_NATIVE_LIBRARY_H_
-#pragma once
-
-#include "base/base_api.h"
-#include "base/native_library.h"
-
-class FilePath;
-
-namespace base {
-
-// A class which encapsulates a base::NativeLibrary object available only in a
-// scope.
-// This class automatically unloads the loaded library in its destructor.
-class BASE_API ScopedNativeLibrary {
- public:
- // Initializes with a NULL library.
- ScopedNativeLibrary();
-
- // Takes ownership of the given library handle.
- explicit ScopedNativeLibrary(NativeLibrary library);
-
- // Opens the given library and manages its lifetime.
- explicit ScopedNativeLibrary(const FilePath& library_path);
-
- ~ScopedNativeLibrary();
-
- // Returns true if there's a valid library loaded.
- bool is_valid() const { return !!library_; }
-
- void* GetFunctionPointer(const char* function_name) const;
-
- // Takes ownership of the given library handle. Any existing handle will
- // be freed.
- void Reset(NativeLibrary library);
-
- // Returns the native library handle and removes it from this object. The
- // caller must manage the lifetime of the handle.
- NativeLibrary Release();
-
- private:
- NativeLibrary library_;
-
- DISALLOW_COPY_AND_ASSIGN(ScopedNativeLibrary);
-};
-
-} // namespace base
-
-#endif // BASE_SCOPED_NATIVE_LIBRARY_H_