| 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_));
|
|
|