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

Side by Side Diff: base/tracked_objects.h

Issue 1124493002: Cleanup: given that TLS slot can't fail to initialize, remove bool return values (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@parchild
Patch Set: Created 5 years, 7 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #ifndef BASE_TRACKED_OBJECTS_H_ 5 #ifndef BASE_TRACKED_OBJECTS_H_
6 #define BASE_TRACKED_OBJECTS_H_ 6 #define BASE_TRACKED_OBJECTS_H_
7 7
8 #include <map> 8 #include <map>
9 #include <set> 9 #include <set>
10 #include <stack> 10 #include <stack>
(...skipping 479 matching lines...) Expand 10 before | Expand all | Expand 10 after
490 const TaskStopwatch& stopwatch); 490 const TaskStopwatch& stopwatch);
491 491
492 // Record the end of execution in region, generally corresponding to a scope 492 // Record the end of execution in region, generally corresponding to a scope
493 // being exited. 493 // being exited.
494 static void TallyRunInAScopedRegionIfTracking(const Births* births, 494 static void TallyRunInAScopedRegionIfTracking(const Births* births,
495 const TaskStopwatch& stopwatch); 495 const TaskStopwatch& stopwatch);
496 496
497 const std::string& thread_name() const { return thread_name_; } 497 const std::string& thread_name() const { return thread_name_; }
498 498
499 // Initializes all statics if needed (this initialization call should be made 499 // Initializes all statics if needed (this initialization call should be made
500 // while we are single threaded). Returns false if unable to initialize. 500 // while we are single threaded).
501 static bool Initialize(); 501 static void Initialize();
502 502
503 // Sets internal status_. 503 // Sets internal status_.
504 // If |status| is false, then status_ is set to DEACTIVATED. 504 // If |status| is false, then status_ is set to DEACTIVATED.
505 // If |status| is true, then status_ is set to PROFILING_ACTIVE. 505 // If |status| is true, then status_ is set to PROFILING_ACTIVE.
506 // If it fails to initialize the TLS slot, this function will return false. 506 static void InitializeAndSetTrackingStatus(Status status);
507 static bool InitializeAndSetTrackingStatus(Status status);
508 507
509 static Status status(); 508 static Status status();
510 509
511 // Indicate if any sort of profiling is being done (i.e., we are more than 510 // Indicate if any sort of profiling is being done (i.e., we are more than
512 // DEACTIVATED). 511 // DEACTIVATED).
513 static bool TrackingStatus(); 512 static bool TrackingStatus();
514 513
515 // Enables profiler timing. 514 // Enables profiler timing.
516 static void EnableProfilerTiming(); 515 static void EnableProfilerTiming();
517 516
(...skipping 284 matching lines...) Expand 10 before | Expand all | Expand 10 after
802 ProcessDataSnapshot(); 801 ProcessDataSnapshot();
803 ~ProcessDataSnapshot(); 802 ~ProcessDataSnapshot();
804 803
805 PhasedProcessDataSnapshotMap phased_snapshots; 804 PhasedProcessDataSnapshotMap phased_snapshots;
806 base::ProcessId process_id; 805 base::ProcessId process_id;
807 }; 806 };
808 807
809 } // namespace tracked_objects 808 } // namespace tracked_objects
810 809
811 #endif // BASE_TRACKED_OBJECTS_H_ 810 #endif // BASE_TRACKED_OBJECTS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698