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

Unified Diff: base/debug/trace_event_impl.cc

Issue 79373002: Remove temporary code after migration of Platform::updateTraceEventDuration (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 1 month 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 | webkit/child/webkitplatformsupport_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/debug/trace_event_impl.cc
diff --git a/base/debug/trace_event_impl.cc b/base/debug/trace_event_impl.cc
index d2f05fc1db77ec9680078de0db802d28d6c5aab1..4f69f086be785bd1f18deb16fb08184b4784ebeb 100644
--- a/base/debug/trace_event_impl.cc
+++ b/base/debug/trace_event_impl.cc
@@ -1933,15 +1933,12 @@ void TraceLog::UpdateTraceEventDuration(
const unsigned char* category_group_enabled,
const char* name,
TraceEventHandle handle) {
- OptionalAutoLock lock(lock_);
-
TimeTicks now = OffsetNow();
- TraceEvent* trace_event = NULL;
- // TODO(wangxianzhu): Remove the !category_group_enabled condition after
- // all clients migrate to the new UpdateTraceEventDuration API.
- if (!category_group_enabled ||
- (*category_group_enabled & ENABLED_FOR_RECORDING)) {
- trace_event = GetEventByHandleInternal(handle, &lock);
+
+ if (*category_group_enabled & ENABLED_FOR_RECORDING) {
+ OptionalAutoLock lock(lock_);
+
+ TraceEvent* trace_event = GetEventByHandleInternal(handle, &lock);
if (trace_event) {
DCHECK(trace_event->phase() == TRACE_EVENT_PHASE_COMPLETE);
trace_event->UpdateDuration(now);
@@ -1956,16 +1953,6 @@ void TraceLog::UpdateTraceEventDuration(
}
}
- // TODO(wangxianzhu): Remove this block after all clients migrate to the
- // new UpdateTraceEventDuration API.
- if (!category_group_enabled || !name) {
- if (!trace_event)
- return;
- category_group_enabled = trace_event->category_group_enabled();
- name = trace_event->name();
- }
-
- lock.EnsureReleased();
if (*category_group_enabled & ENABLED_FOR_EVENT_CALLBACK) {
EventCallback event_callback = reinterpret_cast<EventCallback>(
subtle::NoBarrier_Load(&event_callback_));
« no previous file with comments | « no previous file | webkit/child/webkitplatformsupport_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698