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

Side by Side Diff: base/tracked_objects.cc

Issue 6626064: Add/improve a bunch of comments... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 9 years, 9 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/tracked_objects.h ('k') | chrome/browser/browser_about_handler.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/tracked_objects.h" 5 #include "base/tracked_objects.h"
6 6
7 #include <math.h> 7 #include <math.h>
8 8
9 #include "base/format_macros.h" 9 #include "base/format_macros.h"
10 #include "base/message_loop.h" 10 #include "base/message_loop.h"
(...skipping 434 matching lines...) Expand 10 before | Expand all | Expand 10 after
445 FROM_HERE, new RunTheStatic(function, completion_handle, counter)); 445 FROM_HERE, new RunTheStatic(function, completion_handle, counter));
446 446
447 // Also run Task on our thread. 447 // Also run Task on our thread.
448 RunTheStatic local_task(function, completion_handle, counter); 448 RunTheStatic local_task(function, completion_handle, counter);
449 local_task.Run(); 449 local_task.Run();
450 450
451 WaitForSingleObject(completion_handle, INFINITE); 451 WaitForSingleObject(completion_handle, INFINITE);
452 int ret_val = CloseHandle(completion_handle); 452 int ret_val = CloseHandle(completion_handle);
453 DCHECK(ret_val); 453 DCHECK(ret_val);
454 } 454 }
455 #endif 455 #endif // OS_WIN
456 456
457 // static 457 // static
458 bool ThreadData::StartTracking(bool status) { 458 bool ThreadData::StartTracking(bool status) {
459 #ifndef TRACK_ALL_TASK_OBJECTS 459 #ifndef TRACK_ALL_TASK_OBJECTS
460 return false; // Not compiled in. 460 return false; // Not compiled in.
461 #endif 461 #endif
462 462
463 if (!status) { 463 if (!status) {
464 base::AutoLock lock(list_lock_); 464 base::AutoLock lock(list_lock_);
465 DCHECK(status_ == ACTIVE || status_ == SHUTDOWN); 465 DCHECK(status_ == ACTIVE || status_ == SHUTDOWN);
(...skipping 582 matching lines...) Expand 10 before | Expand all | Expand 10 after
1048 (combined_selectors_ & BIRTH_THREAD) ? "*" : 1048 (combined_selectors_ & BIRTH_THREAD) ? "*" :
1049 sample.birth().birth_thread()->ThreadName().c_str(), 1049 sample.birth().birth_thread()->ThreadName().c_str(),
1050 (combined_selectors_ & DEATH_THREAD) ? "*" : 1050 (combined_selectors_ & DEATH_THREAD) ? "*" :
1051 sample.DeathThreadName().c_str()); 1051 sample.DeathThreadName().c_str());
1052 sample.birth().location().Write(!(combined_selectors_ & BIRTH_FILE), 1052 sample.birth().location().Write(!(combined_selectors_ & BIRTH_FILE),
1053 !(combined_selectors_ & BIRTH_FUNCTION), 1053 !(combined_selectors_ & BIRTH_FUNCTION),
1054 output); 1054 output);
1055 } 1055 }
1056 1056
1057 } // namespace tracked_objects 1057 } // namespace tracked_objects
OLDNEW
« no previous file with comments | « base/tracked_objects.h ('k') | chrome/browser/browser_about_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698