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

Side by Side Diff: base/threading/simple_thread.cc

Issue 8368009: Replace most LOG statements with DLOG statements in base. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 2 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/threading/platform_thread_posix.cc ('k') | base/threading/thread_checker_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) 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/threading/simple_thread.h" 5 #include "base/threading/simple_thread.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/threading/platform_thread.h" 8 #include "base/threading/platform_thread.h"
9 #include "base/string_number_conversions.h" 9 #include "base/string_number_conversions.h"
10 10
(...skipping 11 matching lines...) Expand all
22 } 22 }
23 23
24 SimpleThread::~SimpleThread() { 24 SimpleThread::~SimpleThread() {
25 DCHECK(HasBeenStarted()) << "SimpleThread was never started."; 25 DCHECK(HasBeenStarted()) << "SimpleThread was never started.";
26 DCHECK(HasBeenJoined()) << "SimpleThread destroyed without being Join()ed."; 26 DCHECK(HasBeenJoined()) << "SimpleThread destroyed without being Join()ed.";
27 } 27 }
28 28
29 void SimpleThread::Start() { 29 void SimpleThread::Start() {
30 DCHECK(!HasBeenStarted()) << "Tried to Start a thread multiple times."; 30 DCHECK(!HasBeenStarted()) << "Tried to Start a thread multiple times.";
31 bool success = PlatformThread::Create(options_.stack_size(), this, &thread_); 31 bool success = PlatformThread::Create(options_.stack_size(), this, &thread_);
32 CHECK(success); 32 DCHECK(success);
33 event_.Wait(); // Wait for the thread to complete initialization. 33 event_.Wait(); // Wait for the thread to complete initialization.
34 } 34 }
35 35
36 void SimpleThread::Join() { 36 void SimpleThread::Join() {
37 DCHECK(HasBeenStarted()) << "Tried to Join a never-started thread."; 37 DCHECK(HasBeenStarted()) << "Tried to Join a never-started thread.";
38 DCHECK(!HasBeenJoined()) << "Tried to Join a thread multiple times."; 38 DCHECK(!HasBeenJoined()) << "Tried to Join a thread multiple times.";
39 PlatformThread::Join(thread_); 39 PlatformThread::Join(thread_);
40 joined_ = true; 40 joined_ = true;
41 } 41 }
42 42
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
143 143
144 // A NULL delegate pointer signals us to quit. 144 // A NULL delegate pointer signals us to quit.
145 if (!work) 145 if (!work)
146 break; 146 break;
147 147
148 work->Run(); 148 work->Run();
149 } 149 }
150 } 150 }
151 151
152 } // namespace base 152 } // namespace base
OLDNEW
« no previous file with comments | « base/threading/platform_thread_posix.cc ('k') | base/threading/thread_checker_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698