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

Side by Side Diff: base/tracked_objects.cc

Issue 1997153002: libchrome: Several upstreamable fixes from libchrome Base URL: https://chromium.googlesource.com/a/chromium/src.git@master
Patch Set: Addressed feedback Created 4 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 #include "base/tracked_objects.h" 5 #include "base/tracked_objects.h"
6 6
7 #include <limits.h> 7 #include <limits.h>
8 #include <stdlib.h> 8 #include <stdlib.h>
9 9
10 #include "base/atomicops.h" 10 #include "base/atomicops.h"
(...skipping 723 matching lines...) Expand 10 before | Expand all | Expand 10 after
734 // static 734 // static
735 TrackedTime ThreadData::Now() { 735 TrackedTime ThreadData::Now() {
736 if (now_function_for_testing_) 736 if (now_function_for_testing_)
737 return TrackedTime::FromMilliseconds((*now_function_for_testing_)()); 737 return TrackedTime::FromMilliseconds((*now_function_for_testing_)());
738 if (IsProfilerTimingEnabled() && TrackingStatus()) 738 if (IsProfilerTimingEnabled() && TrackingStatus())
739 return TrackedTime::Now(); 739 return TrackedTime::Now();
740 return TrackedTime(); // Super fast when disabled, or not compiled. 740 return TrackedTime(); // Super fast when disabled, or not compiled.
741 } 741 }
742 742
743 // static 743 // static
744 void ThreadData::EnsureCleanupWasCalled(int major_threads_shutdown_count) { 744 void ThreadData::EnsureCleanupWasCalled(int /*major_threads_shutdown_count*/) {
745 base::AutoLock lock(*list_lock_.Pointer()); 745 base::AutoLock lock(*list_lock_.Pointer());
746 if (worker_thread_data_creation_count_ == 0) 746 if (worker_thread_data_creation_count_ == 0)
747 return; // We haven't really run much, and couldn't have leaked. 747 return; // We haven't really run much, and couldn't have leaked.
748 748
749 // TODO(jar): until this is working on XP, don't run the real test. 749 // TODO(jar): until this is working on XP, don't run the real test.
750 #if 0 750 #if 0
751 // Verify that we've at least shutdown/cleanup the major namesd threads. The 751 // Verify that we've at least shutdown/cleanup the major namesd threads. The
752 // caller should tell us how many thread shutdowns should have taken place by 752 // caller should tell us how many thread shutdowns should have taken place by
753 // now. 753 // now.
754 CHECK_GT(cleanup_count_, major_threads_shutdown_count); 754 CHECK_GT(cleanup_count_, major_threads_shutdown_count);
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after
968 #endif 968 #endif
969 } 969 }
970 970
971 ProcessDataSnapshot::ProcessDataSnapshot(const ProcessDataSnapshot& other) = 971 ProcessDataSnapshot::ProcessDataSnapshot(const ProcessDataSnapshot& other) =
972 default; 972 default;
973 973
974 ProcessDataSnapshot::~ProcessDataSnapshot() { 974 ProcessDataSnapshot::~ProcessDataSnapshot() {
975 } 975 }
976 976
977 } // namespace tracked_objects 977 } // namespace tracked_objects
OLDNEW
« base/metrics/histogram.cc ('K') | « base/trace_event/trace_log.cc ('k') | base/values.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698