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

Unified Diff: base/profiler/tracked_time_unittest.cc

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, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | base/threading/thread_local_storage.h » ('j') | base/tracked_objects.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/profiler/tracked_time_unittest.cc
diff --git a/base/profiler/tracked_time_unittest.cc b/base/profiler/tracked_time_unittest.cc
index 4806a90229722c08758f515e4d9b5f66c253876d..c105688b31dba6ea9175fdbb658f4313264f4bdb 100644
--- a/base/profiler/tracked_time_unittest.cc
+++ b/base/profiler/tracked_time_unittest.cc
@@ -70,16 +70,14 @@ TEST(TrackedTimeTest, TrackedTimerVsTimeTicks) {
TEST(TrackedTimeTest, TrackedTimerDisabled) {
// Check to be sure disabling the collection of data induces a null time
// (which we know will return much faster).
- if (!ThreadData::InitializeAndSetTrackingStatus(ThreadData::DEACTIVATED))
- return;
+ ThreadData::InitializeAndSetTrackingStatus(ThreadData::DEACTIVATED);
// Since we disabled tracking, we should get a null response.
TrackedTime track_now = ThreadData::Now();
EXPECT_TRUE(track_now.is_null());
}
TEST(TrackedTimeTest, TrackedTimerEnabled) {
- if (!ThreadData::InitializeAndSetTrackingStatus(ThreadData::PROFILING_ACTIVE))
- return;
+ ThreadData::InitializeAndSetTrackingStatus(ThreadData::PROFILING_ACTIVE);
// Make sure that when we enable tracking, we get a real timer result.
// First get a 64 bit timer (which should not be null).
« no previous file with comments | « no previous file | base/threading/thread_local_storage.h » ('j') | base/tracked_objects.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698