summaryrefslogtreecommitdiffstats
path: root/base/lazy_instance.cc
diff options
context:
space:
mode:
authorphajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-16 20:38:42 +0000
committerphajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-16 20:38:42 +0000
commit4e7395b4167738538b51f4884cc7c2eacf226752 (patch)
treeb6281c011f28b9f95e860c7f9548ac4f05730a98 /base/lazy_instance.cc
parenta9add880aab37473c810b10bf0165575c547b5d8 (diff)
downloadchromium_src-4e7395b4167738538b51f4884cc7c2eacf226752.zip
chromium_src-4e7395b4167738538b51f4884cc7c2eacf226752.tar.gz
chromium_src-4e7395b4167738538b51f4884cc7c2eacf226752.tar.bz2
Remove test isolation enforcement code.
I think it was a failed experiment, and it only ever worked for base_unittests. This removes some potentially risky code from LazyInstance that was only needed for the test isolation. The lesson from this experiment is that removing singletons works better than trying to make tests work fine even when singletons are overused. TEST=none BUG=12710 Review URL: http://codereview.chromium.org/3127012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@56229 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/lazy_instance.cc')
-rw-r--r--base/lazy_instance.cc11
1 files changed, 0 insertions, 11 deletions
diff --git a/base/lazy_instance.cc b/base/lazy_instance.cc
index f98ba3f..957482c 100644
--- a/base/lazy_instance.cc
+++ b/base/lazy_instance.cc
@@ -36,19 +36,8 @@ void LazyInstanceHelper::CompleteInstance(void* instance, void (*dtor)(void*)) {
// Instance is created, go from CREATING to CREATED.
base::subtle::Release_Store(&state_, STATE_CREATED);
- // Allow reusing the LazyInstance (reset it to the initial state). This
- // makes possible calling all AtExit callbacks between tests. Assumes that
- // no other threads execute when AtExit callbacks are processed.
- base::AtExitManager::RegisterCallback(&LazyInstanceHelper::ResetState,
- this);
-
// Make sure that the lazily instantiated object will get destroyed at exit.
base::AtExitManager::RegisterCallback(dtor, instance);
}
-// static
-void LazyInstanceHelper::ResetState(void* helper) {
- reinterpret_cast<LazyInstanceHelper*>(helper)->state_ = STATE_EMPTY;
-}
-
} // namespace base