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

Side by Side Diff: base/thread_local_storage_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/thread_collision_warner_unittest.cc ('k') | base/thread_local_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) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-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 #if defined(OS_WIN) 5 #if defined(OS_WIN)
6 #include <windows.h> 6 #include <windows.h>
7 #include <process.h> 7 #include <process.h>
8 #endif 8 #endif
9 9
10 #include "base/simple_thread.h" 10 #include "base/threading/simple_thread.h"
11 #include "base/thread_local_storage.h" 11 #include "base/thread_local_storage.h"
12 #include "testing/gtest/include/gtest/gtest.h" 12 #include "testing/gtest/include/gtest/gtest.h"
13 13
14 #if defined(OS_WIN) 14 #if defined(OS_WIN)
15 // Ignore warnings about ptr->int conversions that we use when 15 // Ignore warnings about ptr->int conversions that we use when
16 // storing ints into ThreadLocalStorage. 16 // storing ints into ThreadLocalStorage.
17 #pragma warning(disable : 4311 4312) 17 #pragma warning(disable : 4311 4312)
18 #endif 18 #endif
19 19
20 const int kInitialTlsValue = 0x5555; 20 const int kInitialTlsValue = 0x5555;
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 // Wait for the threads to finish. 85 // Wait for the threads to finish.
86 for (int index = 0; index < kNumThreads; index++) { 86 for (int index = 0; index < kNumThreads; index++) {
87 threads[index]->Join(); 87 threads[index]->Join();
88 delete threads[index]; 88 delete threads[index];
89 delete thread_delegates[index]; 89 delete thread_delegates[index];
90 90
91 // Verify that the destructor was called and that we reset. 91 // Verify that the destructor was called and that we reset.
92 EXPECT_EQ(values[index], kInitialTlsValue); 92 EXPECT_EQ(values[index], kInitialTlsValue);
93 } 93 }
94 } 94 }
OLDNEW
« no previous file with comments | « base/thread_collision_warner_unittest.cc ('k') | base/thread_local_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698