diff options
author | mmentovai@google.com <mmentovai@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-08-13 13:34:43 +0000 |
---|---|---|
committer | mmentovai@google.com <mmentovai@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-08-13 13:34:43 +0000 |
commit | 9e950bddb6d7f49634757d373e3f13a7d0425ae5 (patch) | |
tree | d9e4fbf7a48e382737dbe414e142c04244d2f400 /base/at_exit.h | |
parent | 42718304e7705bb9e6f28f8464a3c731be184eb1 (diff) | |
download | chromium_src-9e950bddb6d7f49634757d373e3f13a7d0425ae5.zip chromium_src-9e950bddb6d7f49634757d373e3f13a7d0425ae5.tar.gz chromium_src-9e950bddb6d7f49634757d373e3f13a7d0425ae5.tar.bz2 |
AtExitManager cleanup.
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@794 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/at_exit.h')
-rw-r--r-- | base/at_exit.h | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/base/at_exit.h b/base/at_exit.h index 123935d..38e7b54 100644 --- a/base/at_exit.h +++ b/base/at_exit.h @@ -27,8 +27,8 @@ // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -#ifndef BASE_AT_EXIT_H__ -#define BASE_AT_EXIT_H__ +#ifndef BASE_AT_EXIT_H_ +#define BASE_AT_EXIT_H_ #include <stack> @@ -37,8 +37,6 @@ namespace base { -typedef void (*AtExitCallbackType)(); - // This class provides a facility similar to the CRT atexit(), except that // we control when the callbacks are executed. Under Windows for a DLL they // happen at a really bad time and under the loader lock. This facility is @@ -56,11 +54,14 @@ typedef void (*AtExitCallbackType)(); class AtExitManager { protected: // This constructor will allow this instance of AtExitManager to be created - // even if on already exists. This should only be used for testing! + // even if one already exists. This should only be used for testing! // AtExitManagers are kept on a global stack, and it will be removed during // destruction. This allows you to shadow another AtExitManager. AtExitManager(bool shadow); + public: + typedef void (*AtExitCallbackType)(); + AtExitManager(); // The dtor calls all the registered callbacks. Do not try to register more @@ -77,10 +78,10 @@ class AtExitManager { private: Lock lock_; - std::stack<base::AtExitCallbackType> stack_; - DISALLOW_EVIL_CONSTRUCTORS(AtExitManager); + std::stack<AtExitCallbackType> stack_; + DISALLOW_COPY_AND_ASSIGN(AtExitManager); }; } // namespace base -#endif // BASE_AT_EXIT_H__ +#endif // BASE_AT_EXIT_H_ |