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

Unified Diff: base/singleton.h

Issue 1805: Add a void* parameter to the AtExitManager callbacks. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 12 years, 3 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 | « base/at_exit_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/singleton.h
===================================================================
--- base/singleton.h (revision 1691)
+++ base/singleton.h (working copy)
@@ -2,13 +2,9 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef BASE_SINGLETON_H__
-#define BASE_SINGLETON_H__
+#ifndef BASE_SINGLETON_H_
+#define BASE_SINGLETON_H_
-#include <stdlib.h>
-
-#include <utility>
-
#include "base/at_exit.h"
#include "base/atomicops.h"
#include "base/platform_thread.h"
@@ -125,7 +121,7 @@
&instance_, reinterpret_cast<base::subtle::AtomicWord>(newval));
if (Traits::kRegisterAtExit)
- base::AtExitManager::RegisterCallback(OnExit);
+ base::AtExitManager::RegisterCallback(OnExit, NULL);
return newval;
}
@@ -159,7 +155,7 @@
private:
// Adapter function for use with AtExit(). This should be called single
// threaded, but we might as well take the precautions anyway.
- static void OnExit() {
+ static void OnExit(void* unused) {
// AtExit should only ever be register after the singleton instance was
// created. We should only ever get here with a valid instance_ pointer.
Traits::Delete(reinterpret_cast<Type*>(
@@ -172,6 +168,4 @@
base::subtle::AtomicWord Singleton<Type, Traits, DifferentiatingType>::
instance_ = 0;
-
-#endif // BASE_SINGLETON_H__
-
+#endif // BASE_SINGLETON_H_
« no previous file with comments | « base/at_exit_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698