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

Side by Side Diff: base/lazy_instance_unittest.cc

Issue 6079009: Move some misc thread-related stuff from base to base/thread and into the bas... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 11 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « base/base.gypi ('k') | base/metrics/stats_table_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2008 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "base/at_exit.h" 5 #include "base/at_exit.h"
6 #include "base/atomic_sequence_num.h" 6 #include "base/atomic_sequence_num.h"
7 #include "base/lazy_instance.h" 7 #include "base/lazy_instance.h"
8 #include "base/simple_thread.h" 8 #include "base/threading/simple_thread.h"
9 #include "testing/gtest/include/gtest/gtest.h" 9 #include "testing/gtest/include/gtest/gtest.h"
10 10
11 namespace { 11 namespace {
12 12
13 base::AtomicSequenceNumber constructed_seq_(base::LINKER_INITIALIZED); 13 base::AtomicSequenceNumber constructed_seq_(base::LINKER_INITIALIZED);
14 base::AtomicSequenceNumber destructed_seq_(base::LINKER_INITIALIZED); 14 base::AtomicSequenceNumber destructed_seq_(base::LINKER_INITIALIZED);
15 15
16 class ConstructAndDestructLogger { 16 class ConstructAndDestructLogger {
17 public: 17 public:
18 ConstructAndDestructLogger() { 18 ConstructAndDestructLogger() {
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 bool deleted2 = false; 131 bool deleted2 = false;
132 { 132 {
133 base::ShadowingAtExitManager shadow; 133 base::ShadowingAtExitManager shadow;
134 static base::LazyInstance<DeleteLogger, 134 static base::LazyInstance<DeleteLogger,
135 base::LeakyLazyInstanceTraits<DeleteLogger> > 135 base::LeakyLazyInstanceTraits<DeleteLogger> >
136 test(base::LINKER_INITIALIZED); 136 test(base::LINKER_INITIALIZED);
137 test.Get().SetDeletedPtr(&deleted2); 137 test.Get().SetDeletedPtr(&deleted2);
138 } 138 }
139 EXPECT_FALSE(deleted2); 139 EXPECT_FALSE(deleted2);
140 } 140 }
OLDNEW
« no previous file with comments | « base/base.gypi ('k') | base/metrics/stats_table_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698