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

Side by Side Diff: base/simple_thread_unittest.cc

Issue 5091005: FBTF: Remove unneeded headers from base/ (part 9) (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: fix win build Created 10 years, 1 month 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/message_pump_win.h ('k') | base/singleton.h » ('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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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/atomic_sequence_num.h" 5 #include "base/atomic_sequence_num.h"
6 #include "base/lock.h"
7 #include "base/simple_thread.h" 6 #include "base/simple_thread.h"
8 #include "base/string_number_conversions.h" 7 #include "base/string_number_conversions.h"
9 #include "base/waitable_event.h" 8 #include "base/waitable_event.h"
10 #include "testing/gtest/include/gtest/gtest.h" 9 #include "testing/gtest/include/gtest/gtest.h"
11 10
12 namespace { 11 namespace {
13 12
14 class SetIntRunner : public base::DelegateSimpleThread::Delegate { 13 class SetIntRunner : public base::DelegateSimpleThread::Delegate {
15 public: 14 public:
16 SetIntRunner(int* ptr, int val) : ptr_(ptr), val_(val) { } 15 SetIntRunner(int* ptr, int val) : ptr_(ptr), val_(val) { }
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 base::WaitableEvent event(true, false); 157 base::WaitableEvent event(true, false);
159 // Changing 9 to 10, for example, would cause us JoinAll() to never return. 158 // Changing 9 to 10, for example, would cause us JoinAll() to never return.
160 VerifyPoolRunner verifier(&seq2, 9, &event); 159 VerifyPoolRunner verifier(&seq2, 9, &event);
161 pool.Start(); 160 pool.Start();
162 161
163 pool.AddWork(&verifier, 10); 162 pool.AddWork(&verifier, 10);
164 163
165 pool.JoinAll(); 164 pool.JoinAll();
166 EXPECT_EQ(seq2.GetNext(), 10); 165 EXPECT_EQ(seq2.GetNext(), 10);
167 } 166 }
OLDNEW
« no previous file with comments | « base/message_pump_win.h ('k') | base/singleton.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698